I have a list say
word = ["engine","ant","aeiou"]
I need to sort the list according to the number of vowels in the list elements. And this sort must change the input as well.
I tried writing the code, by using zip() and a few ops i'm getting the required answer but the input still remains same.
count = 0 vow_count =  for chars in words: for letter in chars: if letter in 'aeiou': count += 1 vow_count.append(count) count = 0
Now i have the number of vowels for each element in a separate list called vow_count. How to sort the word list according to the vow_list so that i have an inplace sort??