Conditional main
- main
- name
def main():
print("Hello World")
if __name__ == "__main__":
main()
- We'll cover this later but in case you'd like, you can include this conditional execution of the main function.
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
def main():
print("Hello World")
if __name__ == "__main__":
main()