QuestionQ76

VerifiedData Collections – Tuples, Dictionaries, Lists, and Strings

Which statements about tuples are true?

Choose two
Explanation

Tuples are immutable — once created their elements cannot be reassigned or changed (B is true) — and they support the same indexing and slicing operations as lists, e.g. t[0] and t[1:3] (D is true). Option A is false because len() works fine on tuples and returns the element count. In the original Python Institute item, option C reads that an empty tuple is written as {}, which is false (curly braces create an empty dict, while an empty tuple is ()); the scraped () here appears to be a transcription artifact, and since the stem asks for exactly two, the canonical answer key is B and D.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!