KnowledgeBoat Logo
|

Informatics Practices

Assertion (A): An empty list can be created using list() method.

Reasoning (R): The following snippet—

>>>L1 = list()
>>>print(L1)

will give the output as:

[]

This statement holds true.

  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

1 Like

Answer

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

Explanation
An empty list can be created using list() method. The provided code:

>>>L1 = list()
>>>print(L1)

will give the output as: [], which represents an empty list.

Answered By

3 Likes


Related Questions