Could someone explain why there is no issue with the first example, but a variable scope error on the second example?

后端 未结 0 665
抹茶落季
抹茶落季 2020-11-21 16:51

No variable scope issue here: (infinite loop, but no error, change \'while\' to \'if\' to prevent loop)

#!/usr/bin/python3
distance = 50
def          


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题