← Language & Syntax
PYTHON · LANGUAGE & SYNTAX

Python Overview

Learn the Python syntax you need to read, understand, and modify everyday code.

Python

Python is a programming language commonly used for:

  • automation
  • data processing
  • APIs
  • AI and machine learning
  • backend development
  • scripting

A simple Python program

name = "Rebecca"
print(name)

The first line stores text in a variable called name.

The second line prints the value.

How Python code runs

Python Code↓Python Interpreter↓Program Runs↓Output

Example

price = 8500
quantity = 10
total = price * quantity

print(total)

Output

85000

Python reads the values, calculates price * quantity, stores the result in total, and prints it.

Basic Python Rules

1. Python is case-sensitive.

name = "Apple"
Name = "Tesla"

name and Name are different variables.

2. Indentation matters.

if price > 8000:
    print("High price")

The indented line belongs to the if block.

3. Python usually runs from top to bottom.

a = 10
b = 20
print(a + b)

Output

30
↑