Skip to content
Question 73 of 97

Q.Fill in the blank : ___________ is not a valid built-in function for list manipulations.

(a) count()
(b) length()
(c) append()
(d) extend()
Yanam CbseCBSE Class XII Board 2023MCQ· 1mImportance★★★★★
75% · 73/97 Questions
🔒 Locked · start free trial →

You're viewing a preview — the full solution, concept, methods & PYQ mapping are locked.

Start your 14-day free trial to unlock the full solution →

Python lists have methods like count(), append(), and extend(), but not length() — to find a list's length you use the built-in function len(), not a method called length(). The answer is (b).

Python lists come with a suite of built-in methods that let you manipulate them directly. The key is knowing which operations are methods (called on the list itself, like my_list.append(x)) versus which are standalone functions (like len(my_list)).

Let's examine each option:

  1. count() — This is a valid list method. It returns the number of times a specified element appears in the list. For example, [1, 2, 2, 3].count(2) returns 2.

  2. length() — This does not exist as a list method in Python. Many students coming from other languages (like JavaScript's array.length property) expect this, but Python uses the built-in function len(my_list) instead. There is no my_list.length() method.

  3. append() — A fundamental list method that adds a single element to the end of the list. my_list.append(5) modifies the list in place. …

Unlock everything free for 14 days

  • Full step-by-step solutions
  • Concept-first explanations
  • Methods, shortcuts & mistakes
  • PYQ mapping + timed mock tests

Full access for 14 days. No credit card required.