Daily #22 · 20 October 2026
Reading before writing Medium
What does this print?
count = 10
def show():
print(count)
count = 5
show()
Show the answer
B: raises UnboundLocalError
Why: Because count is assigned somewhere in the function, Python treats it as local for the whole function, including the line before the assignment. The global is never looked at.