def x():
print("This is a function x")
I defined a function named x
and assigned it to y
y = x
y() # Calling this would call the original function
But what is happening internally, is it assigning a pointer or reference to the function or an instance-like thing I could not understand?
Or is it giving a link to the memory address of where x
is defined?