Skip to content
techsnow

Introduction

Your First Program

Create a file called hello.py:

print("Assalam-o-Alaikum!")
print("My name is Ayesha.")
print("I am learning Python.")

Run it from the terminal:

python hello.py

Output

Assalam-o-Alaikum!
My name is Ayesha.
I am learning Python.

The interactive shell

Type python alone in the terminal to open the REPL, where you can run one line at a time. It's great for quick experiments. Type exit() to leave.

>>> 2 + 3
5
>>> "ha" * 3
'hahaha'