Python scoping issue

https://segmentfault.com/q/1010000007541014?_ea=1376960

Suddenly found the Python scope problem, the Python scope scope has modules, classes, and functions. The variables in the for statement can still be used even after exiting the for loop, which is a little different from Java! The above link explains it very well!

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325815271&siteId=291194637