Home / Python Tips Generated By ChatGPT / The global Keyword in Python Modify global variables inside a function. Source Code x = 5 def change_global(): global x x = 10 change_global() print(x)