list.count()
list.count() works on a list. Lists can change. Many methods update the same list (append, pop, sort, insert) instead of returning a new one.
list.count() — output — 2. How many times 2 appears.
Trap for list.count() — append([1, 2]) nests a list. extend([1, 2]) adds 1 and 2. sort vs sorted is a viva favourite.
index → 0 1 2 list → [Asha, Ravi, Neha]
Exam tip
In place or new list? Say it first, then one example.