Python Tutorial · Python Basics · Lesson 1 of 42
Python Introduction
What Python is, what it's used for, and why it's a great first language.
What is Python?
Python is a popular, general-purpose programming language created by Guido van Rossum and first released in 1991. It's known for readable code — it uses indentation instead of curly braces and reads almost like English.
Python is used for:
- Web development (Django, FastAPI, Flask)
- Data analysis and machine learning (pandas, NumPy, PyTorch)
- Automation and scripting — renaming files, scraping websites, gluing systems together
- Back-end services and APIs
Your first program
Every tutorial starts with "Hello, World!". In Python it's a single line:
print("Hello, World!")
Output
Hello, World!
print() is a built-in function that writes text to the screen. Text in Python goes inside quotes and is called a string.
Why learn Python?
- It runs everywhere: Windows, macOS, Linux and even in your browser (like the examples on this page).
- It has a huge standard library ("batteries included") and hundreds of thousands of packages on PyPI.
- It's one of the most requested languages in job listings and coding interviews.
This tutorial uses Python 3. Python 2 reached end of life in 2020 — always use Python 3 today.
Test yourself
Which function prints text to the screen in Python?
echo()print()console.log()write()
Show answer
Answer: print()
print() is Python's built-in output function. console.log() is JavaScript and echo is PHP.