RG's E-Learning Centre · Book a free demo class · WhatsApp +91-9379416374

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

  1. Track the list after each statement.
  2. Remember append vs extend.
  3. Write the final list or printed value.

Worked example 1 (Basic)

L = [1, 7, 4] L.append(17) print(len(L), L[-1])

  1. L = [1, 7, 4, 17]
  2. len = 4, last = 17
  3. 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))

  1. After insert: [2, 16, 7, 3]
  2. After append: 5 items
  3. Appending a list adds ONE item → 6
  4. Answer: 6

Worked example 3 (Challenge)

L = [2, 8, 8, 12, 24] v = L.pop() L.extend([v, v]) print(L)

  1. pop removes 24
  2. extend adds two items
  3. 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

  1. (Basic) L = [3, 5, 8] L.append(10) print(len(L), L[-1])
  2. (Basic) L = [6, 8, 7] L.append(13) print(len(L), L[-1])
  3. (Standard) L = [5, 8, 4] L.insert(1, 18) L.append(24) L.append([18, 24]) print(len(L))
  4. (Standard) L = [1, 7, 6] L.insert(1, 17) L.append(22) L.append([17, 22]) print(len(L))
  5. (Challenge) L = [8, 4, 5, 17, 29] v = L.pop() L.extend([v, v]) print(L)
  6. (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.

Book a free demo class