Computer Science, asked by debashish326, 5 hours ago

Identify tuple from the following-

a) [3]

b) {1, 2, 3}

c) (1, 2, 3, 4)

d) None of the Above​

Answers

Answered by vaibhav13550
1

Answer:

Option C is the correct answer.

See the leader board.

Answered by anjalin
0

(C) From the given alternatives, (1, 2, 3, 4) is a tuple.

Tuple

  • Tuples are used to keep more than one object in a single variable.
  • A tuple is certainly considered one among four built-in data types in Python used to keep collections of records, the other three are List, Set, and Dictionary, all with distinctive characteristics and usage.
  • A tuple is a set that's ordered and unchangeable.
  • Tuples are written with spherical brackets.

E.g.

            myTuple=("Hello","World","Computer")

Given Alternatives

  • [3] is a list as the square braces are used.
  • {1, 2, 3} is a set at curly braces are used
  • But in (1, 2, 3, 4) is ordered list, as well as spherical braces, are used which denotes that it is a tuple

Conclusion

Hence, From the given alternatives, (1, 2, 3, 4) is a tuple.

Similar questions