Skip to content

Instantly share code, notes, and snippets.

View muriloviana's full-sized avatar

Murilo Viana muriloviana

View GitHub Profile
@muriloviana
muriloviana / filter.py
Last active January 9, 2020 16:35
Functional Programming in Python
numbers = [13, 4, 18, 35]
div_by_5 = filter(lambda num: num % 5 == 0, numbers)
# We can convert the iterator into a list
print(list(div_by_5)) # [35]