This is the list I started with
names = ["Alice", "Beatrice", "Amarnae", "Zootrope"]
The last three items all have 4 vowels each
Created a sorted list based on the count of vowels. Got the one shown below
mylist = [(3, 'Alice'), (4, 'Amarnae'), (4, 'Beatrice'), (4, 'Zootrope')]
I need to return/find the 1st occurrence of the max quantity
print(max(mylist))
which returns
(4, 'Zootrope')
Ask: I need to return as that is the first occurrence of the name in the original list
(4, 'Beatrice')
I have tried a few different things (incl. mylist.sort(key = lambda x: (x[0], x[1])
.. but doesn't seem to work.