var = 5 def func(): global var var = 6 print(6) 转载于:https://www.cnblogs.com/sea-stream/p/11190536.html