
Jake Z. answered 05/05/19
Experienced TA & Tutor for Computer Science: (Python/Java/C)
You can use the "global" keyword to tell python that a specific variable should be considered global. Global variables can be read by any function, but to change their value, you have to use the word "global" again. Here's a quick example: