Skip to content

Instantly share code, notes, and snippets.

@johnptmcdonald
Last active December 26, 2020 19:21
arr = [1, 2, 3, 4, 5, 6]
evens = [num for num in arr if num % 2 == 0]
print(evens)
# [2, 4, 6]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment