how to assign a variable globally in python code example Example: global variables python global x x=1