Write a python program to print element with maximum values from a list


Topic: Write a python program to print element with maximum values from a list

Solution

list1 = ["gfg", "best", "for", "geeks"] 
   
s=[]
for i in list1:
    count=0  
    for j in i:
        if j in ('a','e','i','o','u'):
           count=count+1
    s.append(count)
print(s)    
if  count== max(s):      
    print(list1[s.index(max(s))])



List all Python Programs