nerdexam
Huawei

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…

Huawei AI Development Platforms and Solutions

Question

Python tuples are identified by "()'' and internal elements are separated by ":".

Options

  • ATrue
  • BFalse

How the community answered

(28 responses)
  • A
    21% (6)
  • B
    79% (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

#Python syntax#Tuples#Data structures#Element separators

Community Discussion

No community discussion yet for this question.

Full H13-311_V3.5 Practice