Python Study Guide 2026

Everything you need to pass the Python exam in one place: the exam format, every topic to study, real practice questions with explanations, flashcards, and full-length practice tests. Free, no sign-up needed.

📋 Python Exam Format at a Glance

40
Questions
65 min
Time Limit
70%
Passing Score

📚 Python Topics to Study (69)

✍️ Sample Python Questions & Answers

1. What is the result of `divmod(17, 5)`?
(3, 2)

`divmod(17, 5)` returns a tuple of `(quotient, remainder)`, which is `(3, 2)` since `17 = 5*3 + 2`.

2. Which of the following scenarios best demonstrates the concept of polymorphism in Python?
A function `render_shape(shape)` that can correctly draw a `shape` object whether it is a `Circle` or a `Square`, because both classes have a `.draw()` method.

Polymorphism (from Greek, meaning "many forms") is the ability of an object to take on many forms. In programming, it means that a single interface (like the `render_shape` function) can be used for objects of different types. The function can operate on different shape objects without needing to know their specific type, as long as they adhere to the common interface of having a `.draw()` method.

3. What is the third argument to file.seek(offset, whence)?
The reference position: 0=start, 1=current, 2=end

The whence argument specifies the reference point: 0 for start of file, 1 for current position, and 2 for end of file.

4. Which method removes and returns the last element of a Python list?
pop()

`list.pop()` removes and returns the last element by default, or an element at a given index.

5. What does `enumerate()` return when iterating over a list?
Tuples of (index, value)

`enumerate()` yields `(index, element)` tuples, letting you track both position and value in a loop.

6. What does the following code output? print(bool(0), bool(3.14159), bool(-3), bool(1.0+1j))
False True True True

The `bool()` function converts a value to its boolean equivalent. In Python, zero (0), empty sequences/collections, and `None` are considered "falsy". All other numbers (including non-zero integers, floats, and complex numbers) are considered "truthy". Therefore, `bool(0)` is `False`, while `bool(3.14159)`, `bool(-3)`, and `bool(1.0+1j)` are all `True`.

🎯 Free Python Practice Tests

📖 Python Guides & Articles

Your Python Study Path
1. Learn with Flashcards → 2. Drill Practice Tests → 3. Take the Full Exam Simulation
Was this helpful?