I have a list:
Fruit_list = ['apples','oranges','peaches','peaches','watermelon','oranges','watermelon']
Want to output:
print(most_frequent(Fruit_list))
which should print out "oranges"
I want to find the most frequnent string in the list. The 3 most frequent items are 'oranges','peaches','pears'. However, I want to select 'oranges' as 'o' is before 'p' and 'w' in the alphabet