Python List Comprehensions
nums = [1, 2, 3, 4]
result = [x*x for x in nums]
# result == [1, 4, 9, 16]
result = [x*x for x in nums if x % 2 == 0]
# result = [4, 16]
list(map(lambda x : x*x, nums))
# [1, 4, 9, 16]
list(map(lambda x : x*x, filter(lambda x : x % 2 == 0, nums)))
# [4, 16]