You are not logged in. Your edit will be placed in a queue until it is peer reviewed.
We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.
Required fields*
-
3The ‘k’ in the list comprehension has a different scope.quamrana– quamrana2021年01月10日 22:25:36 +00:00Commented Jan 10, 2021 at 22:25
-
so is it no more accessible from outside the list comprehension?volperossa– volperossa2021年01月10日 22:28:48 +00:00Commented Jan 10, 2021 at 22:28
-
Try print(k) after creating the list comprehension.quamrana– quamrana2021年01月10日 22:29:51 +00:00Commented Jan 10, 2021 at 22:29
lang-py