KnowledgeBoat Logo
|

Informatics Practices

Consider the following statement:

List = ['h', 'o', 'i']

The length of the above list is:

  1. 5
  2. 3
  3. 0
  4. None of these

Python List Manipulation

2 Likes

Answer

3

Reason — The length of a list in Python is determined by the number of elements it contains. The list ['h', 'o', 'i'] has three elements: 'h', 'o', and 'i'. Therefore, the length of the list is 3.

Answered By

3 Likes


Related Questions