Computer Science

Assertion (A): Python lists allow modifying their elements by indexes easily.

Reason (R): Python lists are mutable.

  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

3 Likes

Answer

Both A and R are true and R is the correct explanation of A.

Explanation
Python lists allow modifying their elements using indexes. This is possible because Python lists are mutable, meaning their contents can be changed after creation.

Answered By

1 Like


Related Questions