Python · Exception Handling
Why does this raise UnboundLocalError instead of printing 10? x = 10 def f(): print(x) x = 20 f()
Answer locked. Get the free KnowCard app to reveal it — plus spaced-repetition review so it actually sticks.
Answer locked. Get the free KnowCard app to reveal it — plus spaced-repetition review so it actually sticks.
Free to start — download the app or use it in your browser.