A sentence is split up into a list of words : Map : Buildin Function PYTHON examples


PYTHON examples » Buildin Function » Map »

 

A sentence is split up into a list of words


A sentence is split up into a list of words




sentence = 'It is raining cats and dogs'
 
lengths = map(lambda word: len(word), words)
print lengths

           
       



Leave a Comment / Note


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


PYTHON examples

 Navioo Buildin Function
» Map