#1 India's Top IT Training Institute

×

About Uncodemy

Know more about who we are and what we stand for.

About Us

About Us

Discover our mission to equip individuals with essential IT skills and industry expertise.

Read More →
UnCodeMy Gallery

UnCodeMy Gallery

Explore highlights from our IT training sessions and success stories.

Read More →
×

Free Resources

Learn, practice and plan your career — bilkul free.

Tutorials

Tutorials

Step-by-step written tutorials to learn any technology at your own pace.

Read More →
Free Counselling

Free Counselling

Book a free video counselling session and pick the right course for you.

Read More →
Online Compiler

Online Compiler

Write, run and test your code online — no setup required.

Read More →

Python · Plain-English Glossary

Python Programming Glossary Key Words Explained Simply

A plain-English Python glossary — variables, loops, functions, classes, exceptions, comprehensions and more, each explained in one short paragraph with a code example you can run today.

Tracks
Python Glossary · Live Interactive
Term
—
Glossary word
Meaning
—
Plain English
Example
—
One-liner
Term → Meaning → Example → Use it
Click a group to see the glossary terms, their plain-English meaning, and one short example you can copy.

Home / Tutorials / Python / Python Programming Glossary — Key Words Explained Simply

Python · Plain-English Glossary

Python Programming Glossary — Key Words Explained Simply

BASICS FLOW FUNCTIONS OOP Basics variable, type list, dict, str Data Flow if, for, while break, continue Control Functions def, return, args lambda, *args Reuse OOP & Errors class, self try, except Structure
The glossary follows the same order you actually learn Python — basics first, then flow control, then functions, then classes and errors.

Quick summary — Python key words explained simply

This is a plain-English Python glossary — one short definition per term, with a runnable example. If a tutorial, a job interview or a StackOverflow answer used a word you did not fully understand, it is probably in here.

In this glossary you will find:

  1. Basics — variable, type, list, tuple, dict, set, string.
  2. Flow & functions — if, for, while, def, return, args, kwargs, lambda.
  3. Classes & errors — class, self, __init__, inheritance, try, except.
  4. Mini cheat-sheet — copy-paste snippets you can run.
  5. Practice hints — what to try after reading each term.

SECTION 01Basics & data types

These are the terms you see in your first ten minutes of Python. Each one is defined in plain English, followed by a one-line example:

Term Plain-English meaning Example
Variable A name that stores a value x = 10
Type What kind of value it is type(10) → int
int / float Whole number / decimal number 3, 3.14
str Text in quotes "hello"
bool True or False True, False
list Ordered, changeable collection [1, 2, 3]
tuple Ordered, unchangeable collection (1, 2, 3)
dict Key → value pairs {"a": 1, "b": 2}
set Unordered, unique items {1, 2, 3}
None Means "nothing here yet" x = None
# The five types you will use every day
name = "Ankit"          # str
age = 28                # int
score = 91.5            # float
is_active = True        # bool
skills = ["python", "sql"]   # list

# The two collection types you will also use a lot
location = {"city": "Delhi", "pin": "110092"}   # dict
unique_ids = {101, 102, 103}                     # set

# None means "no value yet"
selected = None
python-basics.md
Key insight: Most beginner bugs are type bugs. If Python says TypeError, print type(...) for both variables before you guess.

SECTION 02Flow control & functions

These words control which lines run, and how many times:

Term Plain-English meaning Example
if / elif / else Run code only when a condition is true if x > 0:
for Repeat for every item in a sequence for n in [1,2,3]:
while Repeat while a condition is true while x < 10:
break Exit the loop immediately break
continue Skip to the next iteration continue
def Define a reusable block of code def greet():
return Send a value back to the caller return x + 1
parameter / argument The input a function expects / the value you pass def add(a, b):
*args / **kwargs Accept many extra positional / keyword arguments def f(*a, **k):
lambda A tiny one-line anonymous function lambda x: x*2
# if / elif / else
score = 82
if score >= 90:
    grade = "A"
elif score >= 75:
    grade = "B"
else:
    grade = "C"
print(grade)      # B

# for loop
for n in [1, 2, 3, 4, 5]:
    if n == 3:
        continue          # skip 3
    if n == 5:
        break             # stop at 5
    print(n)              # 1, 2, 4

# while loop
count = 0
while count < 3:
    print("tick", count)
    count += 1
python-flow-functions.md
Key insight: A function should do one thing and return something. If you are printing inside a function and using the print output elsewhere, you probably want return instead.

SECTION 03Classes, objects & errors

These are the words that confuse beginners the most, so they are explained in one line each:

Term Plain-English meaning Example
class A blueprint for making objects class Dog:
object / instance A real thing made from a class d = Dog()
__init__ Runs automatically when you create the object def __init__(self):
self Refers to the current object self.name = name
attribute A value stored inside an object d.name
method A function attached to an object d.bark()
inheritance A class that reuses another class class Puppy(Dog):
try / except Handle errors instead of crashing try: ... except:
raise Deliberately trigger an error raise ValueError("bad")
Exception The base type of most runtime errors except Exception as e:
class Dog:
    def __init__(self, name, age):
        self.name = name        # attribute
        self.age = age          # attribute

    def bark(self):             # method
        return f"{self.name} says woof"

d = Dog("Rex", 3)               # instance
print(d.bark())                 # Rex says woof
print(d.name)                   # Rex

# Inheritance
class Puppy(Dog):
    def bark(self):
        return f"{self.name} says yip"

p = Puppy("Milo", 1)
print(p.bark())                 # Milo says yip
python-classes-errors.md
Key insight: A class groups data and behaviour together. If you find yourself passing the same three variables to five functions, it is usually time to make a class.

SECTION 04Mini cheat-sheet

Copy this section into a scratch file — it covers the 90% of Python you will write in your first month:

# Variables and types
x = 10
name = "Ankit"
flag = True

# Lists, dicts, sets
nums = [1, 2, 3]
info = {"name": "Ankit", "age": 28}
unique = {1, 2, 2, 3}        # {1, 2, 3}

# Conditionals
if x > 5:
    print("big")
else:
    print("small")

# Loops
for n in nums:
    print(n)

# Functions
def add(a, b=0):
    return a + b

# Classes
class Point:
    def __init__(self, x, y):
        self.x = x
        self.y = y

# Errors
try:
    result = 1 / 0
except ZeroDivisionError:
    result = None

# Comprehensions
squares = [n*n for n in range(5)]   # [0,1,4,9,16]

# F-strings
print(f"{name} is {28} years old")
python-cheatsheet.md

SECTION 05How to practise the glossary

Reading a glossary once will not make you fluent. Here are six ways to turn these words into actual skill:

  • Write one example per term — a 3-line script is enough. The act of typing it beats reading it.
  • Rewrite your own code using each word — replace a loop with a comprehension, a dict with a class, a print with a return.
  • Read error messages out loud — TypeError, KeyError, IndexError and ValueError tell you exactly which glossary term is broken.
  • Keep a personal glossary file — every time you see a new word, add one line and one example. Your file is worth more than this page.
  • Explain it to someone else — if you cannot explain self in one sentence, you do not yet understand self.
  • Build something tiny every week — a CLI calculator, a CSV cleaner, a text file parser. Real use locks the words in.
Pro tip: The fastest way to learn Python vocabulary is to build something that breaks. Every error message is a glossary lesson you cannot forget.

SECTION 06Python Q&A — glossary questions

Q1What is the difference between a list and a tuple?

A list can change (you can add or remove items); a tuple cannot. Use a tuple when the data is fixed — like coordinates or a record that should not be edited by mistake.

Q2What is self actually doing?

self is the object currently being worked on. When you call d.bark(), Python automatically passes d as self inside the method.

Q3When should I use a lambda?

Only for very small one-line functions, usually inside sorted(), map() or filter(). If it needs a name, a docstring, or more than one line, use def.

Q4What is a comprehension?

A short way to build a list, dict or set from an existing sequence. [n*n for n in range(5)] creates [0, 1, 4, 9, 16] in one line.

Q5Why do I keep getting TypeError?

Usually because you are mixing types — adding a string to a number, or passing the wrong number of arguments to a function. Print type(...) for each value before the error line.

SECTION 07Test yourself — Python glossary quiz

Five questions. No sign-up.

0 / 5

Pick an answer to see why it is right or wrong.

SECTION 08Frequently asked questions

What is the difference between a parameter and an argument?

A parameter is the name in the function definition — def add(a, b). An argument is the actual value you pass when calling it — add(2, 3).

What does *args actually do?

It collects any extra positional arguments into a tuple, so the function can accept any number of inputs. **kwargs does the same for keyword arguments, as a dictionary.

What is the difference between == and is?

== checks if two values are equal. is checks if they are the same object in memory. Use is almost only for None.

Why does "5" + 5 fail?

Because one is a string and one is an integer — Python refuses to guess your intent. Convert first: int("5") + 5.

Do I need to learn classes to write useful Python?

Not immediately — functions and dicts cover a lot. But you will need classes as soon as you use libraries like Django, SQLAlchemy or even basic dataclasses.

Classroom & online · Delhi NCR

Learn Python the way it is actually used

Our Python Training Course takes you from these glossary terms to real scripts, projects and interview-ready code — with live classes and mentor reviews.

₹15,500 onwards ₹24,000
  • Core Python & OOP
  • Real projects, not toy snippets
  • Interview-style exercises
  • Weekday & weekend batches