Answers for "python variable scope"

3

python variable scope

a = 5

def f1():
  a = 2
  print(a)
  
print(a)   # Will print 5
f1()       # Will print 2
Posted by: Guest on May-20-2020

Python Answers by Framework

Browse Popular Code Answers by Language