HomeBlogPython
Python

5 Python Concepts You Must Know Before Your Exam

Most Python beginners skip these five areas — and they show up on every exam. Here's what to study and how to spot gaps before test day.

Examifyr·Apr 2026·5 min read

You've been learning Python for a few weeks or months. You feel comfortable writing code. But when exam day comes, most people find out there are gaps they didn't know existed.

Here are the five Python concepts that catch people off guard most often — and what you need to know about each one.

1. Mutability and how it affects function arguments

Python has mutable types (lists, dicts, sets) and immutable types (strings, tuples, integers). This becomes critical when you pass objects to functions.

def add_item(item, lst=[]):
    lst.append(item)
    return lst

print(add_item(1))  # [1]
print(add_item(2))  # [1, 2] — not [2]!

The default mutable argument is created once and shared across calls. This is one of the most common exam traps.

What to know: Always use None as the default for mutable arguments and initialise inside the function.

2. How Python resolves variable scope (LEGB)

Python looks up variables in this order: Local → Enclosing → Global → Built-in. Most people know local vs global, but the enclosing scope (closures) catches people out.

x = 10

def outer():
    x = 20
    def inner():
        print(x)  # prints 20, not 10
    inner()

outer()

What to know: The difference between global and nonlocal, and when each is needed.

3. List comprehensions vs generator expressions

These look almost identical but behave very differently in terms of memory.

# List comprehension — builds entire list in memory
squares = [x**2 for x in range(1000000)]

# Generator — yields one value at a time
squares = (x**2 for x in range(1000000))

What to know: Generators use () not []. They're lazy — values are produced one at a time. You can only iterate through them once.

4. Exception handling — what actually gets caught

Most people understand try/except basics, but exam questions go deeper.

try:
    result = 10 / 0
except ZeroDivisionError:
    print("caught")
else:
    print("no exception")   # runs only if no exception
finally:
    print("always runs")    # runs no matter what

What to know: The purpose of else (no exception occurred) and finally (always runs, even with a return statement).

5. Truthiness — what evaluates to False

Python has a clear set of falsy values. Knowing them is essential for reading and writing idiomatic Python.

# All of these are falsy:
bool(0)        # False
bool(0.0)      # False
bool("")       # False
bool([])       # False
bool({})       # False
bool(None)     # False

# This trips people up:
bool([0])      # True — non-empty list

What to know: Any non-empty container is truthy, even if its contents are falsy. [0], {0}, and "0" are all truthy.

How to know if you've actually got these down

Reading about a concept feels different from being tested on it under exam conditions. The best way to find out where your real gaps are is to take a timed, scored practice test — one that shows you topic-by-topic where you're strong and where you're not.

That's exactly what the Examifyr Python readiness test does. 30 questions, instant score, topic breakdown — free, no sign-up.

🎯

Think you're ready? Prove it.

Take the free Python readiness test. Get a score from 0–100, a topic breakdown, and your exact weak areas — in under 20 minutes.

Take the free Python test →

Free · No sign-up · Instant results

More from Examifyr

← All articles