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
29
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 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).

  2. 2 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.

  3. 3 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.

  4. 4 Easy

    What fundamental property distinguishes a Python tuple from a standard list?

    Answer: Immutability

    Why: Tuples containing only immutable elements can serve as dictionary keys, while lists can never be hashed as keys.

  5. 5 Easy

    Which keyword is used to define a new function?

    Answer: def

    Why: Short for 'define', def binds a function object to a specified name in local scope.

  6. 6 Easy

    What symbol marks the start of a single-line comment?

    Answer: #

    Why: One Python comment is not ignored: a '# coding:' line on line 1 or 2 sets the file's encoding, and without it Python 3 assumes UTF-8.

Keep going in the app

Scan to open on your phone