return the biggest even fro a list python

Solutions on MaxInterview for return the biggest even fro a list python by the best coders in the world

showing results for - "return the biggest even fro a list python"
Jakob
30 Nov 2016
1b=[10,30,40,88,77,99,12515,365,959,48,8595,95,9,59,59,5,9,9,49,5,548485844842]
2def is_even(lis) :
3    i=len(lis)-1
4    lis.sort()
5    while max(lis)%2!=0:
6        i=i-1
7        if lis[i]%2==0:
8            break
9    return lis[i]
10print(is_even(b))
11
12