KnowledgeBoat Logo

Class - 12 CBSE Computer Science — Assertion Reason Type Questions

Assertion (A): There is no difference between a list and a tuple in Python.

Reasoning (R): The list elements are enclosed within square brackets [] separated by commas and the tuple elements are enclosed within parentheses () separated by commas.

  1. Both A and R are true and R is the correct explanation of A.
  2. Both A and R are true but R is not the correct explanation of A.
  3. A is true but R is false.
  4. A is false but R is true.

Python Data Handling

2 Likes

Answer

A is false but R is true.

Explanation
Lists are mutable, meaning their elements can be changed after creation, and they are enclosed within square brackets [] separated by commas. On the other hand, tuples are immutable, so their elements cannot be changed after creation, and they are enclosed within parentheses () separated by commas. Hence, list and tuples are not same.

Answered By

2 Likes