KnowledgeBoat Logo
|

Informatics Practices

Assertion (A): In Python, list is an immutable collection of data.

Reasoning (R): Mutable means that any change or alteration in data is mentioned in the same place. The updated collection will use the same address for its storage.

  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 List Manipulation

2 Likes

Answer

A is false but R is true.

Explanation
In Python, list is a mutable collection of data, i.e., values in the list can be modified. The term "mutable" means that the objects can be changed in place, and any modifications to the object will use the same memory address.

Answered By

1 Like


Related Questions