The longest word

NiklasRTZ niklasro at gmail.com
Tue Jul 28 04:26:57 EDT 2009


Newbie hello onwards to the .py manual asks meantime how the longest
word gets determined?
First word, ok
 'a aa aaa aa'[:'a aa aaa aa'.find(' ',1,10)]
'a'
rfind is another subset
>>> 'a aa aaa aa'[:'a aa aaa aa'.rfind(' ',1,10)]
'a aa aaa'
One row should be able. It's a direct word 'a aa aaa...' and can be a
variable, it's no big deal it occurs twice still naturally easier if
also occured just once.
Sincere thanks & regards
Niklas



More information about the Python-list mailing list