Moving around in a string
jeder at earthlink.net
Sat Dec 6 19:19:59 CET 2003
On Sat, 06 Dec 2003 08:18:00 -0600, Mark Engle wrote:
> Peter Otten wrote:
>> Mark Engle wrote:
>> > http://www.python.org/doc/current/lib/module-string.html
>> One caveat (only for the string module), quoting from the above
>> document, but easily overlooked:
>> "Many of the functions provided by this module are also defined as
>> methods of string and Unicode objects; see ``String Methods''
>> (section 2.2.6) for more information on those."
>> So whenever you're tempted to write string.somefunc(s, moreargs),
>> rather use s.somefunc(moreargs).
> Thank you. Time to do some more reading.
Thanks for the split function. It did the trick of splitting up the words
to the appropriate white space.
words_within = sentence.split()
When printed, it lists all the words separated by white
I'll be back after some more research however ;)
More information about the Python-list