Puzzle 16: Explanation
Let’s look at the scope of variables in Python and the cause of the `UnboundLocalError` exception.
Try it yourself
Try executing the code below to verify the result:
Get hands-on with 1400+ tech skills courses.
Let’s look at the scope of variables in Python and the cause of the `UnboundLocalError` exception.
Try executing the code below to verify the result:
Get hands-on with 1400+ tech skills courses.