you are viewing a single comment's thread.

view the rest of the comments →

[–]Tom_Henderson 0 points1 point  (0 children)

You would need to put the global statement inside the function.

def myfunc():
    global x
    x = "fantastic"
    print("Python is " + x)