Mar-16-2019, 07:47 PM
you need to pass x as an argument:
#secondary.py def function(x): print("secondary:", x) #main.py from secondary import function x=0 function(x)Also, be aware that you set x to 0 prior to running function