DEV Community

Discussion on: Understanding map, filter, and zip in Python

Collapse
 
falconych profile image
falconych

I am a little bit confused,

def square(number):
return number*number
even_numbers = [2,4]
correct me if I am wrong:
even_numbers_squared should be = [4, 16] instead of [4, 8]

Collapse
 
codespent profile image
Patrick Hanford

Yupp you're correct! Just absent-mindedley added there instead apparently lol.