AnatomyOf

Anatomy of a Python file

example.py
1"""A minimal Python script. Batteries included, semicolons not."""
2
3import os
4
5GREETING = "Hello"
6
7def main():
8 print(f"{GREETING} from {os.name}!") # it works on my machine
9
10if __name__ == "__main__":
11 main()
Python is an interpreted, high-level, general-purpose programming language emphasizing code readability.