# function 3 def num_occur(c, s): """takes a single character c and an arbitrary string s and returns the number of times that c occurs in s""" lc = ([x for x in s if x == c]) return len(lc) # function 4 def most_occur(c, words): """ takes a single character c and a list of one or more strings called words and returns the string in the list with the most occurrences of c""" scored_occur = [[num_occur(c, words), x] for x in words] return scored_occur