[Tutor] A string-manipulation question

R. Alan Monroe amonroe at columbus.rr.com
Fri Mar 30 02:37:56 CEST 2007


> Hi. I want to learn how to "break down" a string into its component  
> words, and then process each word somehow.

> Is there a way in Python to separate a string into its component words.

> Like this:
> "I would like to convert an English string (sentence) into Pig Latin."

for word in sentence.split():
    print word



Alan



More information about the Tutor mailing list