Site navigation

The function used to find the length of a list in Python is

Question and options

The function used to find the length of a list in Python is
  1. size()
  2. count()
  3. length()
  4. len()

Answer and explanation

Correct answer: D - len()
len(list) returns the number of items in a Python list. count() counts occurrences of a value.

Practice for these exams

  • CUSAT CAT M.Sc. Forensic Science

  • Uttarakhand Judicial Services

    Subject revision

Related question papers

Related exam syllabi

More solved explanations in Computer fundamentals