count for item in lif item> count=count+ example given list that contains numbers between and create new list whose first element is how many ones are in lwhose second element is how many twos are in letc frequencies [for in range( , )frequences append( count( )the key is the list method count that tells how many times something occurs in list example write program that prints out the two largest and two smallest elements of list called scores scores sort(print'two smallest'scores[ ]scores[ ]print'two largest'scores[- ]scores[- ]once we sort the listthe smallest values are at the beginning and the largest are at the end example here is program to play simple quiz game num_right question print'what is the capital of france'end'guess input(if guess lower()='paris 'print'correct'num_right+= elseprint'wrong the answer is paris 'print'you have 'num_right'out of right '#question print'which state has only one neighbor'end'guess input(if guess lower()='maine 'print'correct'num_right+= elseprint'wrong the answer is maine 'print'you have 'num_right'out of right'