1globalvar = "flower"
2
3def editglobalvar():
4 global globalvar # accesses the "globalvar" variable, so when we change it
5 # it won't assign the new value to a local variable,
6 # not changing the value of the global variable
7
8 globalvar = "good" # assigning new value
9
10print(globalvar) # outputs "flower"
11# if we didnt use the "global" keyword in the function, it would print out
12# "flower"
13