Page 2 - Home Assignment - LISTS
P. 2
Home Assignment
10. Write a program to find smallest element and its index in a number list.
11. Write a program to delete all odd numbers of an integer list
12. Write a program to swap two halves of a number list, containing even number of
elements
13. Write a program to update list elements, if the elements are integers replace with its
square and if string, swap the cases of the string
14. Input list P and Q of integers (of same size), make a new list L whose each element is
sum of corresponding element of P and Q
15. Write a program to count the frequency of each element of a list, store the elements
in a new list and its frequency in a separate list, print each element with its
frequency.
16. Write a program to shift each element of the list to its left and first element to last
17. Write a Python program to remove duplicates from a list.
18. Write a Python program to find the second smallest number in a list.
19. Write a program to make a list [a, bb, ccc, ......]
20. Write a program to make a list [a, ab, abc,......]