Quick actions

cmd+k|ctrl+k

Navigation

Languages

Lecture 8 Global local

Snippet info

Language

Python

Visibility

public

Author

tonyngswell

Created

2026-05-07T13:23:03.439082Z

Updated

2026-05-07T13:23:03.439082Z

x=1 #global variable
def a():
    global x
    x=2
    x= x+10 # local variable
    print(type(x))
a()
print(x)

INFO