I already declare b = 6 globally. But why this code shows an error instead of printing b = 6.But when I delete b = 33 inside that is inside the function the code works well & print b = 6. But why?
b = 6
def f(a):
print(a)
print(b)
b = 33
f(20)