List operations and methods: Class 11 practice
Lists are mutable. Read the method, follow the three worked examples, then try the six questions.
What you should know first
- Indexing
The idea behind list operations and methods
Lists are mutable. append() adds one item at the end, extend() adds each item of another list, insert(i, x) puts x at index i, pop() removes and returns the last item, and slicing returns a new list.
Step-by-step method
- Track the list after each statement.
- Remember append vs extend.
- Write the final list or printed value.
Worked example 1 (Basic)
L = [1, 7, 4] L.append(17) print(len(L), L[-1])
- L = [1, 7, 4, 17]
- len = 4, last = 17
- Answer: 4 17
Worked example 2 (Standard)
L = [2, 7, 3] L.insert(1, 16) L.append(24) L.append([16, 24]) print(len(L))
- After insert: [2, 16, 7, 3]
- After append: 5 items
- Appending a list adds ONE item → 6
- Answer: 6
Worked example 3 (Challenge)
L = [2, 8, 8, 12, 24] v = L.pop() L.extend([v, v]) print(L)
- pop removes 24
- extend adds two items
- Answer: [2, 8, 8, 12, 24, 24]
Common mistakes and misconceptions
- Thinking append([1, 2]) adds two items
- Forgetting pop() removes the item
Practice questions
- (Basic) L = [3, 5, 8] L.append(10) print(len(L), L[-1])
- (Basic) L = [6, 8, 7] L.append(13) print(len(L), L[-1])
- (Standard) L = [5, 8, 4] L.insert(1, 18) L.append(24) L.append([18, 24]) print(len(L))
- (Standard) L = [1, 7, 6] L.insert(1, 17) L.append(22) L.append([17, 22]) print(len(L))
- (Challenge) L = [8, 4, 5, 17, 29] v = L.pop() L.extend([v, v]) print(L)
- (Challenge) L = [4, 1, 8, 12, 28] v = L.pop() L.extend([v, v]) print(L)
Answer key with full working
- Q1: L = [3, 5, 8, 10] → len = 4, last = 10 → Answer: 4 10
- Q2: L = [6, 8, 7, 13] → len = 4, last = 13 → Answer: 4 13
- Q3: After insert: [5, 18, 8, 4] → After append: 5 items → Appending a list adds ONE item → 6 → Answer: 6
- Q4: After insert: [1, 17, 7, 6] → After append: 5 items → Appending a list adds ONE item → 6 → Answer: 6
- Q5: pop removes 29 → extend adds two items → Answer: [8, 4, 5, 17, 29, 29]
- Q6: pop removes 28 → extend adds two items → Answer: [4, 1, 8, 12, 28, 28]
Syllabus note
This skill is listed under "Lists in Python" for Class 11 in the NCERT/CBSE books. ICSE, IGCSE, IB and state boards may teach it in a different chapter or year.
Answers on this page are generated and automatically re-checked by a second, independent calculation. They have not been reviewed by a teacher — if you spot a problem, tell us on WhatsApp.
Related practice and notes
Frequently asked questions
Which chapter is list operations and methods in?
"Lists in Python", Class 11 Computer Science (NCERT/CBSE). Other boards may place it differently.
How were the answers checked?
Answers on this page are generated and automatically re-checked by a second, independent calculation. They have not been reviewed by a teacher — if you spot a problem, tell us on WhatsApp.