nerdexam
Huawei

H13-311_V3.5 · Question #139

About Python correct tuple, which is correct description? (Multiple choice)

The correct answer is A. The difference between a list and a tuple is that the elements of the tuple cannot be B. The list uses square brackets and the tuple uses parentheses C. Tuple creation is very simple just add elements in parentheses and separate them wrth commas D. When a tuple contains only one element you need to add a comma after the element. All four options are correct descriptions of Python tuples, making this an "all of the above" scenario. A is correct because tuples are immutable - once created, their elements cannot be changed, added, or removed (the answer appears cut off, but refers to "cannot be…

AI Overview

Question

About Python correct tuple, which is correct description? (Multiple choice)

Options

  • AThe difference between a list and a tuple is that the elements of the tuple cannot be
  • BThe list uses square brackets and the tuple uses parentheses
  • CTuple creation is very simple just add elements in parentheses and separate them wrth commas
  • DWhen a tuple contains only one element you need to add a comma after the element

How the community answered

(43 responses)
  • A
    100% (43)

Explanation

All four options are correct descriptions of Python tuples, making this an "all of the above" scenario.

A is correct because tuples are immutable - once created, their elements cannot be changed, added, or removed (the answer appears cut off, but refers to "cannot be modified"). This contrasts directly with lists, which are mutable.

B is correct because Python syntax uses [] for lists (e.g., [1, 2, 3]) and () for tuples (e.g., (1, 2, 3)).

C is correct - tuple creation is straightforward: my_tuple = (1, 2, 3). The comma-separated elements inside parentheses are all that's needed.

D is the trickiest but still correct: a single-element tuple requires a trailing comma - (42,) is a tuple, but (42) is just the integer 42 in parentheses. Python uses the comma, not the parentheses, to define a tuple.

Since all options are correct, there are no distractors here - the question tests whether you know all four properties simultaneously.

Memory tip: Think FIST - Format (parentheses), Immutable (no changes), Simple creation (commas), Trailing comma (single element). If you know all four, you know tuples cold.

Topics

#Python tuples#Immutable sequences#Data structures#Syntax

Community Discussion

No community discussion yet for this question.

Full H13-311_V3.5 Practice