Skip to content
LearnClash logoLearnClash
Python

Python quiz

3 questions. No signup. Your move.

Question 1 of 3Easy

Which built-in function outputs text to the screen or console?

Free to play, no ads.Get the app
35
Questions
8
ELO tiers
Spaced repetition

More questions about Python

These visible examples show the question style. LearnClash turns the full topic into ranked duels and spaced repetition.

  1. 1 Easy

    Which built-in function returns the number of items in a Python list?

    Answer: len()

    Why: len() is an O(1) operation because Python data structures store their element count internally.

  2. 2 Medium

    Which Python collection gives the fastest appends at both ends?

    Answer: deque

    Why: Inserting at the front of a list requires shifting every element in O(n) time, whereas a deque does it in O(1).

  3. 3 Hard

    If funcs = [lambda: i for i in range(5)], what is funcs[0]()?

    Answer: 4

    Why: Closures resolve variables when called rather than when created, so each lambda sees the loop's final value.

  4. 4 Easy

    What index number retrieves the very first element of a Python list?

    Answer: 0

    Why: Negative indexing is also supported, where index -1 accesses the very last element of the list.

  5. 5 Medium

    When does the else block of a Python for loop execute?

    Answer: If no break statement was triggered

    Why: This pattern eliminates the need for boolean flag variables when searching through sequences for a target item.

  6. 6 Hard

    What kind of object does super() return?

    Answer: A proxy object

    Why: Instead of returning the parent class directly, super() produces a proxy object that delegates lookups dynamically.

Keep going in the app

Scan to open on your phone