0% found this document useful (0 votes)
1 views1 page

Python List Programs Questions

Uploaded by

daksh.dips02874
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views1 page

Python List Programs Questions

Uploaded by

daksh.dips02874
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Python List Programs Questions

Q1: Make a program to perform following operation on the list –


marks = [78,87,89,67,56]
1.​ Add 98 at the end of the list.
2.​ Add 46 at the 3rd Position in the list
3.​ Remove 87 from the list
4.​ Determine the index of 67 in the list
5.​ Sort the marks in descending order

Q2: Make a program to perform following operation on the list –

names = [‘Ritu’, ‘Divya’, ‘Shruti’, ‘Amit’, ‘Priya’]

1.​ Sort the names in ascending order.


2.​ Insert a ‘Divya’ at the 5th position in the list.
3.​ Delete ‘Ritu’ from the list.
4.​ Display count of ‘Divya’ in the list.
5.​ Add [‘Riya’,’Arav’] as individual elements in the list.
6.​ Add [‘Kriti’,’Preeti’] as a nested list in the list.

Q3: Make a program to perform following operation on the list –

L= [‘mango’, 56, ‘Shruti’, 66.8, ‘Delhi’,100, ’welcome1’]

1.​ Add 98.5 at the end of the list


2.​ Insert ‘Singapore’ at the 3rd position in the list.
3.​ Copy the list from 2nd to 5th position in a newlist
4.​ Display the newlist.
5.​ Delete 100 from the list.

You might also like