A global variable in Python is often declared as the top of the program. In other words, variables that are declared outside of a function are known as global variables.