Test global variable access.

This commit is contained in:
Captain ALM 2022-11-30 16:03:51 +00:00
parent 22635900ee
commit cc050dad9f
Signed by: alfred
GPG Key ID: 4E4ADD02609997B1

14
main.py
View File

@ -1,6 +1,10 @@
#Python unpack testing
numbers = [1, 2, 3]
x, y, z = numbers
#Global test
x = 0
print(x)
print(y)
print(z)
def myfunc():
global x
x = 1
print(x)
myfunc()