So here are a few questions on list for you to practice.
And first question is multiply elements in the list.
So here is your input list.
Multiply list is your input list containing elements from 1 to 10 and you need to multiply each of the
elements in the input list and display the output.
The second question.
Remove duplicate from a list.
So this is your input list.
Duplicate list.
You need to delete the duplicate elements from this list and finally display the list containing no
duplicate elements.
The third question.
Create a list using slicing.
So here you have two lists.
Input list list 1 and list.
Do you need to create a new list list 3 which contains the last three elements from list 1 and forced
3 elements from list 2.
And you can use slicing on the input list to create the new list.
And this is the expected output next question.
It lists using different methods.
So here is the input list all list.
You need to create a new list which has the same set of elements as the old list and the new list should
be defined in such a way that that if you make changes to the old list the changes should not be deflected
in new list.
So you can think all the various methods or ways that we have discussed in class to generate the new
list and the next question is how do you define the new list.
If you want the changes in one list to reflect in the other list next question list comprehension.
This is your input list and using list comprehension.
You need to create a new list and the elements in the new list should be generated by adding integers
7 to each element in the input list.
And this is the expected output.
Next question can ward a list to a string.
And this is your input list and you need to convert the about list into a string so you can use the
methods that were discussed in class to convert a list to a string.
Next question is on nested lists.
So here we have a list the three sublease and you need to write a program to print each element in the
sublease in a new line.
So this is how your output should look like the elements in the sublease should be printed like this.
Each element in a new line.
So these are the different questions on list.
So please go ahead and work on them.
Good luck.