Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # b is first defined inside a trivially true if statement
- In [6]: if True:
- ...: b = 21
- ...:
- # b is still defined globally
- In [7]: b
- Out[7]: 21
- # it does matter that the if statement is evaluated
- In [10]: if False:
- ....: b = 1337
- ....:
- In [11]: b
- Out[11]: 21
Add Comment
Please, Sign In to add comment