What are local variables and global variables in Python? code example
Example: global var in python
a = input('Hello: ')
if a == 'world':
global b
b = input('Here')
print b
#Prints the input for be as a result
a = input('Hello: ')
if a == 'world':
global b
b = input('Here')
print b
#Prints the input for be as a result