Quick actions

cmd+k|ctrl+k

Navigation

Languages

Highest Even

Snippet info

Language

Python

Visibility

public

Author

e.sgl

Created

2026-06-16T11:20:39.86965Z

Updated

2026-06-16T11:20:39.86965Z

def highest_even(li):
    if li.count == 0:
        return -1
    res = 0
    for item in li:
        if item % 2 == 0 and item > res:
            res = item
    return res
    
print(highest_even([10,2,3,4,8,11]))
INFO