EX.
NO: 5 LIST AND TUPLES
16.02.2026
AIM :
To understand and apply various operations on Lists and Tuples in Python
PROBLEM 1: Write a Python program to perform matrix multiplication of two
matrices A and B using List.
CODING :
OUTPUT :
PROBLEM 4: Given a number N followed by two lists A and B of N integers each.
Form a third list C of size N where each element of list C is the sum of the
respective elements in lists A and B.
CODING :
OUTPUT :
PROBLEM 9: Write a program to remove negative elements and print positive
elements including the neutral element ‘0’ in the list.
CODING :
OUTPUT :
PROBLEM 11: Given a list of numbers in Python List, write a Python program to
create a list of tuples having first element as the number and second element as
the cube of the number.
CODING :
OUTPUT :
PROBLEM 3: Write a Python Program to accept Three Digits and Print all possible
combinations from the digits.
CODING :
OUTPUT :
PROBLEM 2: Write a Python Program to find the second largest number in a List.
CODING :
OUTPUT :
PROBLEM 12: Write a python program to check if one tuple is subset of other.
CODING :
OUTPUT :
PROBLEM 5: Write a Python Program to Remove the I- th Occurrence of the given
word in a List
where words can repeat.
CODING :
OUTPUT :
PROBLEM 8 : “Shades” Television Channel organizes a fun-filled event named
“Best Couple 2017”, where in married couples would be invited and given many
tasks and activities. Based on some criteria decided by the jury, a best couple will
be chosen. N couples registered for the event and each couple was given a
registration number (it may repeat). One specific couple’s registration Id was
missed. The event coordinators wanted your help in finding the missing Id. Write
a program, which takes an array of registration numbers as input and outputs the
missing registration Id.
CODING :
OUTPUT :
PROBLEM 7: Write a program to count the occurrences of each element in the list.
The occurrence list is displayed in the ascending order of the values present in the
list.
CODING :
OUTPUT :
RESULT :
Thus, Python programs were successfully executed to perform various operations on
Lists and Tuples, including creation, accessing elements, modification (for lists),
deletion, slicing, and the use of built-in functions.