반응형 __main__ == "__main__":1 What does if __name__ == “__main__”: do? 궁금해서 찾아보았는데 과제하는데 도움이 될 것 같아서 공부삼아 기록한다. When your script is run by passing it as a command to the Python interpreter, python myscript.py all of the code that is at indentation level 0 gets executed. Functions and classes that are defined are, well, defined, but none of their code gets run. Unlike other languages, there's no main() function that gets run automatically - the main() function is im.. 2018. 9. 15. 이전 1 다음 반응형