A lambda function squares the members of a sequence : Lambda : Function PYTHON TUTORIALS


PYTHON TUTORIALS » Function » Lambda »

 

A lambda function squares the members of a sequence


print map(lambda x: x ** 2, range(6))
# list comprehension statement:
print [x ** for x in range(6)]



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo Function
» Lambda