https://www.cnblogs.com/Lin-Yi/p/7305364.html
Among the basic syntax of python, a function can be read without global data, but to modify global data when there are two methods:
. 1 2 Global global variable declarations global variable is a variable type of data can be modified when
https://blog.csdn.net/sc_lilei/article/details/80464645
this explanation is very clear and thorough