How am I supposed to define ‘n’ in the below scenario? What is ‘n’? Is it the number of items in the list or is it a specific number?
Create a function named
more_than_nthat has three parameters named
n.The function should return
itemappears in the list more than
ntimes. The function should return
Here is what I have so far:
#Write your function here def more_than_n(lst, item, n): length_list = len(lst) if item > length_list: return True else: False #Uncomment the line below when your function is done print(more_than_n([2, 4, 6, 2, 3, 2, 1, 2], 2, 3))