CBSE Class 12 Computer Science Question 27 of 105

Python Revision Tour II — Question 6

Back to all questions
6
Question

Question 6

What data type is the object below ?
L = 1, 23, 'hello', 1

  1. list
  2. dictionary
  3. array
  4. tuple
Answer

tuple

Reason — For creating a tuple, enclosing the elements inside parentheses is optional. Even if parentheses are omitted as shown here, still this statement will create a tuple.