1:23:47Python if __name__ == '__main__' ❓
From the creator
python if __name__ == '__main__' name == main tutorial example explained #python #name #main # *********************************** # if __name__ == '__main__' # *********************************** # y tho? # 1. Module can be run as a standalone program # or # 2. Module can be imported and used by other modules # Python interpreter sets "special variables", one of which is __name__ # Python will assign the __name__ variable a value of '__main__' if it's # the initial module being run def main(): print("Hello!") if __name__ == '__main__': main() # *********************************** Bro Code merch store 👟 : =========================================================== https://teespring.com/stores/bro-code-5 ===========================================================
Published 2021-02-08 · Watch on YouTube ↗
Availability and playback restrictions are controlled by the original channel.





