Skip to main content

How to run Python files

There are three ways to run Python files:

  1. Using Code Runner
  2. Using Terminal
  3. Using IDLE
  4. In our website (trinket)

1. Code Runner

Writing code and pressing the traingle button will run the code.

However, you cannot type in the code directly.

So, most of the time, you would need to use the Terminal.

print("hello world")


2. Terminal

Terminal is a space for typing commands and running them.

Running the code below will run the file.


To open the terminal, follow one of the steps below.

  1. Press ctrl + ` (press ctrl with `)
  2. Terminal > New Terminal




If you have enabled the 'IDLE' option while installing, you can run python code in the IDLE.

Search for IDLE or double click on one of the shortcuts.


Typing print("Hello World") and pressing entering will print the result.

4. Trinket (

Our site uses the Trinket to run Python code.