Почему mainloop() не в начале вашего кода, а в конце? ⇐ Python
-
Anonymous
Почему mainloop() не в начале вашего кода, а в конце?
I understand how the function works itself, however, mainloop() is usually at the end of your code in modules like turtle and tkinter and you're required to put it at the end or there will be a syntax error and/or the remaining code is discarded
Since Python is a step by step process, wouldn't it make more sense for it to be put at the start?
Источник: https://stackoverflow.com/questions/780 ... of-the-end
I understand how the function works itself, however, mainloop() is usually at the end of your code in modules like turtle and tkinter and you're required to put it at the end or there will be a syntax error and/or the remaining code is discarded
Since Python is a step by step process, wouldn't it make more sense for it to be put at the start?
Источник: https://stackoverflow.com/questions/780 ... of-the-end