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

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

6(iii)Written · 2025 · Section B · 2025 Specimen

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

Show SolutionHide Solution↓
numbers = [10, 20, 30, 40, 50]
numbers.append(60)
numbers.insert(2, 25)
numbers.sort()
index_30 = numbers.index(30)
print("Index of 30:", index_30)
print("Final list:", numbers)
Index of 30: 3
Final list: [10, 20, 25, 30, 40, 50, 60]
← Previous questionNext question →

Browse the free Robotics & AI sample bank