How To Use A Global Variable
my_globvar = 0def change_globvar(): global my_globvar # Needed to modify m_globvar my_globvar = 1 # we can change value of global variable change_globvar() print(my_globvar) Younes Derfoufimy-courses.net
Python Courses & Exercises with solutions !
my_globvar = 0def change_globvar(): global my_globvar # Needed to modify m_globvar my_globvar = 1 # we can change value of global variable change_globvar() print(my_globvar) Younes Derfoufimy-courses.net
x = 10print(type(x))// type intx = float(x) print(type(x))// flot type Younes Derfoufimy-courses.net
x = 5print (type (x)) # x is of type intx = "Hello World"print (type (x)) # x is now of type string Younes Derfoufimy-courses.net
By: Roberto Sedycias As we started the project of our web site, we knew that the proprietary software costs would be too high for our financial resources. Our only…