I have written a simple function to understand local and global scope in Python .
x = 50
def func(x):
print('x is', x)
x = 2
print('Changed local x to', x)
func(x)
print('x is still', x)
what I want to understand here is inside the function during x= 2 assignment whether any new variable is getting created as the globally the variable x is still holding the value 50 . How this process occurs in Python?