DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
Python Modifying Global Variable From Inside the Function
c = 1 # global variable def add(): c = c + 2 # increment c by 2 print(c) add()
Source by www.python-kurs.eu #
PREVIOUS
NEXT
Tagged:
#Python
#Modifying
#Global
#Variable
#From
#Inside
#Function
ADD COMMENT
Topic
COMMENT
Name
3+1 =
Submit