H13-311_V3.5 · Question #310
Python tuples are identified by "()'' and internal elements are separated by ":".
The correct answer is B. False. B is correct because the statement contains a critical error: tuple elements are separated by commas (,), not colons (:). For example, (1, 2, 3) is a valid tuple. Why A is wrong: Accepting the statement as true would mean confusing tuple syntax with dictionary syntax. Colons…
Question
Python tuples are identified by "()'' and internal elements are separated by ":".
Options
- ATrue
- BFalse
How the community answered
(28 responses)- A21% (6)
- B79% (22)
Explanation
B is correct because the statement contains a critical error: tuple elements are separated by commas (,), not colons (:). For example, (1, 2, 3) is a valid tuple.
Why A is wrong: Accepting the statement as true would mean confusing tuple syntax with dictionary syntax. Colons are used in dictionaries ({"key": "value"}), not tuples - a common source of confusion for beginners.
The tricky part: The first half of the statement is actually correct - tuples do use parentheses (). The statement is false only because of the colon claim, making this a compound-statement trap designed to catch readers who skim.
Memory tip: Think "Tuple = Commas in Curvy brackets" - the two C's remind you that Commas are the separator, and parentheses are the Curvy brackets. Reserve colons mentally for dictionaries and slices.
Topics
Community Discussion
No community discussion yet for this question.