def change():
global x
w.write("zzz")
x=x+1
print (x)
w.close()
if __name__ == "__main__":
w=open('test.txt','w')
x=5
change()
Why has not understood why the change in function can be read w, c language is affected by the impact,
that after this is a separate main function, in fact, just a if, so w, x are global variables.
if __name__ == "__main__":