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()
PREVIOUS
NEXT
Tagged:
#Python
#Modifying
#Global
#Variable
#From
#Inside
#Function
ADD COMMENT
Topic
COMMENT
Name
9+5 =
Submit