Python Basics · Beginner Glossary · 2026
Python Programming Terms Every Beginner Should Understand
Quick summary — Python terms every beginner should know
You don't need to memorise every Python term — you just need to recognise the essentials. Once you understand variables, data types, functions, and control flow, the rest follows naturally. This glossary covers the vocabulary in plain English so you can read tutorials and write real code with confidence.
In this guide you will find:
- Basics and data types — variables, strings, numbers, lists, tuples, sets, dicts.
- Logic and control flow — if, for, while, break, continue, booleans.
- Functions and modules — def, args, returns, imports.
- Errors and exceptions — try/except, error types.
- How to use this glossary — practical tips.
SECTION 01Basics and data types
These terms form the foundation of every Python program. Learn them first.
| Term | Plain English meaning |
|---|---|
| Variable | A named box that stores a value |
| Integer (int) | A whole number (e.g., 5, -20) |
| Float | A number with a decimal (e.g., 3.14) |
| String (str) | Text wrapped in quotes (e.g., "hello") |
| Boolean (bool) | True or False — a logical value |
| List | An ordered, changeable collection [1, 2, 3] |
| Tuple | An ordered, unchangeable collection (1, 2, 3) |
| Set | An unordered collection of unique items {1, 2, 3} |
| Dictionary (dict) | A collection of key-value pairs {"name": "Ananya"} |
| None | A special value meaning "no value" |
| Index | A position in a collection (starts at 0) |
| Slice | Taking a part of a collection (list[0:3]) |
# Variables and basic types
name = "Ananya" # string
age = 27 # integer
height = 5.6 # float
is_student = True # boolean
print(name) # "Ananya"
print(age + 1) # 28
# Python infers the type — no explicit declaration
# You can check it with type()
print(type(age)) # <class 'int'>
# Collections — list, tuple, set, dict
skills = ["Python", "SQL", "Git"] # list — changeable
coordinates = (12.9, 77.6) # tuple — unchangeable
unique_ids = {101, 102, 103} # set — unique only
person = {"name": "Ananya", "age": 27} # dict — key-value
print(skills[0]) # "Python"
print(skills[0:2]) # ["Python", "SQL"]
print(person["name"]) # "Ananya"
print("Python" in skills) # True
SECTION 02Logic and control flow
These terms describe how Python decides what to do next. They appear in almost every program.
| Term | Plain English meaning |
|---|---|
| if | Runs code only if a condition is true |
| else | Runs code if the if condition was false |
| elif | Checks another condition if the first was false |
| Comparison operators | == (equals), != (not equals), <, >, <=, >= |
| Logical operators | and, or, not |
| for loop | Repeats code for each item in a sequence |
| while loop | Repeats code while a condition is true |
| break | Exits the loop early |
| continue | Skips the current iteration and continues |
| Indentation | Spaces used to define blocks of code (Python-specific) |
# if / elif / else
score = 85
if score >= 90:
print("A grade")
elif score >= 75:
print("B grade")
else:
print("Keep practising")
# Logical operators
age = 22
has_id = True
if age >= 18 and has_id:
print("Entry allowed")
else:
print("Entry denied")
# for loop — repeat for each item
skills = ["Python", "SQL", "Git"]
for skill in skills:
print(f"I am learning {skill}")
# while loop — repeat while condition is true
count = 0
while count < 3:
print("Attempt", count + 1)
count += 1
# break — exit early
for num in range(10):
if num == 5:
break
print(num)
# continue — skip one iteration
for num in range(5):
if num == 2:
continue
print(num)
SECTION 03Functions and modules
Functions let you reuse code. Modules let you reuse code across files. Both are essential as soon as your programs grow.
| Term | Plain English meaning |
|---|---|
| Function | A reusable block of code with a name |
| def | The keyword that defines a function |
| Parameter | An input a function expects |
| Argument | The actual value passed to a function |
| Return | The value a function gives back |
| Scope | Where a variable is visible in code |
| Lambda | A short, anonymous function |
| Module | A Python file containing reusable code |
| Package | A folder of modules |
| import | Pulls a module into your code |
| Standard library | Built-in Python modules available by default |
# A function with parameters and return value
def greet(name, greeting="Hello"):
return f"{greeting}, {name}!"
message = greet("Ananya")
print(message) # "Hello, Ananya!"
# A lambda — short anonymous function
double = lambda x: x * 2
print(double(5)) # 10
# Functions can return multiple values
def min_max(numbers):
return min(numbers), max(numbers)
low, high = min_max([3, 1, 7, 5])
print(low, high) # 1 7
# Importing modules
import math
print(math.sqrt(16)) # 4.0
# Import specific names
from datetime import datetime
print(datetime.now().year)
# Alias a module
import numpy as np
# np.array([1, 2, 3])
# Standard library modules you'll use often:
# math, random, datetime, json, os, sys, csv
# Third-party modules are installed with pip
# pip install requests
SECTION 04Errors and exceptions
Errors are part of programming. These terms help you understand what went wrong and how to fix it.
| Term | Plain English meaning |
|---|---|
| Syntax error | Code that doesn't follow Python's rules — won't run |
| Runtime error | A problem that occurs while the code is running |
| Exception | Python's way of signalling that something went wrong |
| try | Wraps code that might raise an exception |
| except | Handles a specific exception |
| finally | Runs code whether or not an exception occurred |
| raise | Manually trigger an exception |
| TypeError | Wrong type used (e.g., adding a string to a number) |
| ValueError | Right type but wrong value (e.g., int("abc")) |
| KeyError | Missing key in a dictionary |
| IndexError | Index out of range in a list |
# Handling an exception
try:
number = int("not a number")
except ValueError as e:
print(f"Conversion failed: {e}")
# Handling different exceptions differently
try:
data = {"name": "Ananya"}
print(data["age"])
except KeyError:
print("The 'age' key is missing")
# finally runs no matter what
try:
f = open("file.txt")
# do something
finally:
f.close()
# Common Python errors and causes:
# TypeError — mixing incompatible types
# "5" + 5 → TypeError
# ValueError — correct type, wrong value
# int("abc") → ValueError
# KeyError — missing dictionary key
# {"a": 1}["b"] → KeyError
# IndexError — index out of range
# [1, 2, 3][5] → IndexError
# NameError — variable not defined
# print(unknown_var) → NameError
# ZeroDivisionError — dividing by zero
# 10 / 0 → ZeroDivisionError
# Learning to read error messages is one of the most
# valuable beginner skills.
SECTION 05How to use this glossary
A glossary is a reference tool, not a study plan. Here is how to use it effectively.
- Return to it as you code — check a term once, keep coding, and come back when it appears again.
- Don't memorise — recognise — you'll naturally learn by using these terms in real code.
- Run the examples — typing and running code teaches faster than reading.
- Build a small project — the fastest way to make terms stick is to use them.
- Read error messages carefully — they reference these terms constantly.
SECTION 06Interview Q&A — Python basics
Q1What's the difference between a list and a tuple?
Lists are mutable (changeable); tuples are immutable (unchangeable). Use lists when the data changes, and tuples when it shouldn't.
Q2What's the difference between a parameter and an argument?
A parameter is the name inside the function definition. An argument is the actual value passed when calling the function.
Q3Why does Python require indentation?
Indentation defines code blocks in Python. Unlike other languages that use braces, Python uses whitespace — so indentation is part of the syntax, not just style.
Q4What's the difference between a module and a package?
A module is a single Python file. A package is a folder of modules, usually with an __init__.py file. Packages let you organise larger codebases.
Q5What is a dictionary used for?
Dictionaries store key-value pairs. Use them when you need to look up a value by name or ID rather than by position — like storing user profiles, config settings, or lookup tables.
SECTION 07Test yourself — Python terms quiz
Five questions. No sign-up.
0 / 5Pick an answer to see why it is right or wrong.
SECTION 08Frequently asked questions
What's the difference between a list and a dictionary in Python?
A list stores items in order and accesses them by position (index). A dictionary stores key-value pairs and accesses values by key. Use a list for sequences, a dict for lookups.
What does 'indentation' mean in Python?
Indentation is the spaces at the start of a line that group code into blocks. In Python, indentation is meaningful — it defines what runs inside a function, loop, or if-statement.
What is a 'module' in Python?
A module is a Python file containing code you can reuse — like functions, classes, and constants. You bring a module into your code using import.
What's the difference between a syntax error and an exception?
A syntax error means the code can't run at all (broken syntax). An exception happens while the code runs — even if the syntax is fine. For example, a division by zero.
Do I need to memorise all these terms?
No. Recognising them is enough. You'll naturally memorise the ones you use. The glossary is a reference, not a test.
SECTION 09Related reads
Classroom & online · Noida
Learn Python from the basics up
Our Python Training Course covers variables, data types, functions, control flow, and real projects — with mentor support and interview preparation.
₹15,500 · full programme- Beginner-friendly curriculum
- Real projects
- Mock interviews
- Weekday & weekend batches