🐍 Python

What is Python?

Lesson 1 of 5 ~5 min

Python is a high-level, interpreted programming language known for its readability and versatility. Created by Guido van Rossum and first released in 1991, Python has become one of the most popular languages in the world.

Python is used for web development, data science, machine learning, automation, scripting, and much more. Its clean syntax makes it an excellent first language to learn.

Why Python?

Your first Python code

Python uses indentation to define code blocks instead of braces. Here's a simple example:

Editor
Python
Output

Try it

Edit the name and age variables on the left. The output on the right updates as you type.

Readability through indentation

Unlike many languages that use {} to define code blocks, Python uses indentation. This forces you to write visually clean, well-structured code.

# Comments start with a hash symbol
name = "Alice"          # Variable assignment
print(name)             # Output: Alice

# Indentation defines code blocks
if name == "Alice":
    print("Hello, Alice!")   # This line is indented
else:
    print("Who are you?")

Key concepts

Quiz

What symbol is used for comments in Python?
Challenge

Create variables for your name and age, then print them using an f-string like f"Hello, {name}!"