Advertisement
Guest User

Untitled

a guest
Dec 7th, 2018
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. def a():
  2. exec("AD = (1,2,3,4,5,6);")
  3. for i in AD:
  4. print(i)
  5.  
  6. a()
  7. --------------
  8. linux-xk05:/home/zenix/Desktop # python3 py.py
  9. Traceback (most recent call last):
  10. File "py.py", line 6, in <module>
  11. a()
  12. File "py.py", line 3, in a
  13. for i in AD:
  14. NameError: name 'AD' is not defined
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement