I have a sample python code here, it intrigues me a lot....
listt = ['hii']
var = 0
def fool():
listt.append('p')
var += 10
fool()
print(listt)
print(var)
I obviously get an error in function that var
is referred before assignment, but why not for listt
?