Write a Python program that creates a tuple with elements from a list. Your program should do the following:

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

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

Write a Python program that creates a tuple with elements from a list. Your program should do the following:

Show SolutionHide Solution↓
my_list = [10, 20, 30, 40, 50]
my_tuple = tuple(my_list)
element = my_tuple[2]
print("Tuple:", my_tuple)
print("Element at index 2:", element)
Tuple: (10, 20, 30, 40, 50)
Element at index 2: 30
← Previous questionNext question →

Browse the free Robotics & AI sample bank