Fundamental Programming Variables & Scope Beginner
Q What does this Python code print? def outer(): n = 0 def inner(): nonlocal n n += 1 inner(); inner() return n print(outer())
  • A 1
  • C 2
  • D UnboundLocalError
Leave a Comment