Which of the following is not an example of a collection in Python?

2026

Which of the following is not an example of a collection in Python?

Answer: B. boolIn Python, collections are data structures capable of holding multiple items. Examples include lists, tuples, sets, and dictionaries. The bool type represents…

  1. A.

    list

  2. B.

    bool

  3. C.

    tuple

  4. D.

    str

Attempted by 557 students.

Show answer & explanation

Correct answer: B

In Python, collections are data structures capable of holding multiple items. Examples include lists, tuples, sets, and dictionaries. The bool type represents a single truth value (True or False) rather than storing multiple elements, so it is not considered a collection type.

Explore the full course: Bpsc

Loading lesson…