First script - hello world
examples/basics/hello.py
print("Hello World")
- Create a file called hello.py with the above content.
- Open your terminal or the Anaconda Prompt on MS Windows in the directory (folder)
- Change to the directory where you saved the file.
- Run it by typing python hello.py or python3 hello.py
- The extension is .py - mostly for the editor (but also for modules).
- Parentheses after print() are required in Python 3, but use them even if you are stuck on Python 2.