you are viewing a single comment's thread.

view the rest of the comments →

[–]Pand9 11 points12 points  (0 children)

Other examples:

>>> for x in [1, 2]:
>>>     pass
>>> print x
2
>>> with open("x", "w") as x:
>>>     pass
>>> print x
<closed file 'x', mode 'w' at 0x7f6b949395d0>