Can someone give a little insight. I am looking at this thinking logically different that it comes out. The def is asking for three things, now I am logically trying to look at this and get out of it more than what is there.
Item1 > Item2
Item2 > Item1
Item1 = Item2
With these I am looking to see how two are logic modifiers for a single item1 as the def asks for.
****** Question asked
Create a function named
more_frequent_item that has three parameters named
item1 , and
item2 depending on which item appears more often in
If the two items appear the same number of times, return
#Write your function here def more_frequent_item(lst, item1, item2): if lst.count(item2) >= lst.count(item1): return item2 else: return item1 #Uncomment the line below when your function is done print(more_frequent_item([2, 3, 3, 2, 3, 2, 3, 2, 3], 2, 3))