Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

global python

name = "Abdullah" # creates global variable

def func():
  global name # calls the name variable from global scope
  
  name = "Kemal" # Changes name variable

func()
print(name) # global name variable will be changed because of the global keyword
Source by www.python-kurs.eu #
 
PREVIOUS NEXT
Tagged: #global #python
ADD COMMENT
Topic
Name
9+2 =