CBSE Class 12 Computer Science Question 43 of 120

Review of Python Basics — Question 17

Back to all questions
17
Question

Question 17

Identify the valid declaration of L:

L = [1, 23, 'hi', 6]
  1. list
  2. dictionary
  3. array
  4. tuple
Answer

list

Reason — The given declaration L = [1, 23, 'hi', 6] creates a list in Python. Lists are created using square brackets [] and can contain elements of different data types, including integers, strings, and other lists.