1. Global variables are variables used within and without the functions: reference: W3schools: Python tutorial.
2. In this case: unless you run the program using ‘Desktop Site’ on smartphone: the code would run into ‘indentation error’ during compilation. Works fine on desktop.
3. Note: since function is being called only after the first print command: it first prints ‘awesome’ and then ‘fantastic.'( global keyword)
One thought on “Global variables in Python!”