Given lst = [30, 1, 2, 1, 0], what is the return value of each of the followingstatements?
lst.index(1)
lst.count(1)
len(lst)
max(lst)
min(lst)
sum(lst)
in list index() method returns the item of specified index.
so lst.index(1) returns the item 1.
count() method returns the number of times specified item occur in the list.
so lst.count(1)returns 2 number of times 1 occur on list.
len() method retuns total length of the list.
so len(lst) returns 5.
max() method returns maximum number in the list.
so max(lst) returns 30.maximum number of the list.
min() method returns the minmum number in the list.
so min(lst) returns the 0.minimum number of the liist.
sum() method is used to sums up the numbers in list.
so sum(lst) returns 34.