CBSE Class 11 Computer Science Question 1 of 82

Lists in Python — Question 1

Back to all questions
1
Question

Question 1

Assertion (A): List in Python is a collection of values of any type.

Reasoning (R): In lists, you can change the elements of a list in place.

  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.
Answer

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

Explanation
List in Python is a collection of values of any type such as strings, integers, floats, objects or even a list. Lists in Python are mutable, meaning we can change the elements of a list in place.