A sentence is split up into a list of words,sentencesplit,sentence = '
A sentence is split up into a list of words,sentencesplit,sentence = '
sentence = 'It is raining cats and dogs'lengths = map(lambda word: len(word), words)print lengths
相关内容
- Demonstrates the range() function,demonstratesrange,print 'Count
- str() and repr(): Strings and floating point numbers, have two distin
- Big number,bignumber,print 999999
- Bitwise or,bitwiseor,x = 1
- Anything with a non-zero length is true, empty sequences are false,
- Complex Numbers: Multiply,numbersmultiply,print (2+1j)
- Complex numbers: represented as two floating point numbers,,#Comple
- Int: modulus (remainder), power,modulusremainder,a = 3
- Lists can be written as a list of comma-separated values (items) betw
- Define and use integer,defineinteger,print 2+2
评论关闭