Jul-11-2019, 07:17 AM
Hi, today i came across this code:
#test1.py x=1 def change(): import test1 test1.x=2 change() print(x)output is:
2 1I want to ask why this doesn't make a cyclic reference, since change function import a module have the function itself. And also, it's output should be 1,2 instead of 2,1 right ?