iwantcoding.com
🔥 Daily 👥 Rooms 🏆 Top Log in Sign up

Python Get Started

You can run Python in this tutorial without installing anything. To use it outside the browser, install the official build from python.org.

Three ways to run Python

WayHow
In this tutorialClick Open the Python Editor » on the home page — runs in your browser via Pyodide.
Interactive REPLRun python in a terminal. Type expressions, see results.
Script fileSave code to hello.py, then python hello.py in the terminal.

Your first script

PYTHON — hello.py
# hello.py
print('Hello, world')
print('2 + 3 =', 2 + 3)

Run it:

SHELL
$ python hello.py
Hello, world
2 + 3 = 5

Editor choices

  • VS Code — free, the most common Python editor. Add the official Python extension.
  • PyCharm — JetBrains' Python IDE; Community Edition is free.
  • Jupyter — notebook style, great for data work.
  • Just a text editor + terminal — works fine. That's how the language was designed to be used.
Tip: Install the latest stable Python 3.x. Avoid the system Python on macOS/Linux for development — use pyenv or the python.org installer so updates don't break the OS.

Example

Example
# Save as hello.py and run:  python hello.py
print('Hello, world')
Try it Yourself »

Exercise

The standard Python source file extension is…

hello.

Test yourself

Q1. The standard Python script file extension is…
Q2. To run a script in a terminal you type…
Q3. On macOS / Linux, for project Pythons prefer…

Discussion

Loading…