[Tutor] How to "grab" a word in a sentance,in Python

Karl Pflästerer sigurd@12move.de
Tue Jul 15 13:33:08 2003


On 15 Jul 2003, Paul Hickey <- pauljhickey@eircom.net wrote:

> Hi , im trying to "grab" a word or two in a program im trying to write in
> Python, eh im a newbie! to Python and programming.

> Something like " input.... What is your favourite hobby?
>                         Answer.... I like to play golf. With a reply print
>                         "never played golf, sounds boring!!!!"

> I tried to put the "key" word in a list but could not get it to work,
> ive tried some other ideas to no avail. 
> Any pointers would be great.

Could you elaborate a bit what you like to do?  What do these words you
like to filter have in common (in regard to the answer given)? Eg. are
they always at the same place (the last word in the sentence). etc


   Karl
-- 
Männer der Wissenschaft! Man sagt ihr viele nach, 
aber die meisten mit Unrecht.  
                             Karl Kraus 'Aphorismen'