
Python quiz
3 questions. No signup. Your move.
Which built-in function outputs text to the screen or console?
Now make it a duel.
Play more questions on Python in LearnClash. Challenge friends in a new quiz duel.
Play more in the appA tap copies this page’s link so the app can pick up where you left off.
That was every question in this preview. Pick another topic or keep going in the app.
A new quiz every day: Today’s quiz
The video couldn’t load. You can watch it on YouTube.
Choose a topic, answer questions and challenge a friend in LearnClash.
Watch on YouTubeA tap copies this page’s link so the app can pick up where you left off.
More questions about Python
These visible examples show the question style. LearnClash turns the full topic into ranked duels and spaced repetition.
-
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.
-
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).
-
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.
-
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.
-
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.
-
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.