def check(x):
    if (x%2 == 0 or x%4 == 0):
        return 1
evens = list(filter(check,range(2, 22)))
print(evens)

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: