Write a Python program that performs the following operations on a list of integers:

ICSE Class 10 Robotics & AI PYQ · 2025 Paper · Section B

8(iii)Written · 2025 · Section B · 2025 Paper

Write a Python program that performs the following operations on a list of integers:

Show SolutionHide Solution↓
numbers = [5, 15, 25, 35, 45]

numbers.append(55)

numbers.insert(1, 20)

numbers.remove(35)

index_25 = numbers.index(25)
print("Index of 25:", index_25)

print("Final list:", numbers)
Index of 25: 3
Final list: [5, 20, 15, 25, 45, 55]
← Previous question

Browse the free Robotics & AI sample bank