$ ./guess_the_languageProblem Solving — fill the blank
Problem Solving — fill the blank · easy · #99

Complete the function

# returns only the even numbers from nums
def evens(nums):
    return [n for n in nums if n % 2 ____ 0]
# evens([1,2,3,4]) -> [2,4]

Answer: == (also accepted: ==)

An even number has a remainder equal to 0 when divided by 2.
Play Problem Solving ▸