[Tutor] How to "grab" a word in a sentance,in Python
Paul Hickey
pauljhickey@eircom.net
Tue Jul 15 03:41:59 2003
This is a multi-part message in MIME format.
------=_NextPart_000_0029_01C34AAC.B0468DB0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
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.
Thanks
Paul.
------=_NextPart_000_0029_01C34AAC.B0468DB0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1170" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi , im trying to "grab" a word or two =
in a program=20
im trying to write in Python, eh im a newbie! to Python and=20
programming.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Something like " input.... What is your =
favourite=20
hobby?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> =20
=
=20
Answer.... I like to play golf.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> =20
=
With=20
a reply print "never played golf, sounds=20
boring!!!!"</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I tried to put the "key" word in a list =
but could=20
not get it to work, ive tried some other ideas to no avail.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Any pointers would be =
great.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Thanks</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Paul.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV></BODY></HTML>
------=_NextPart_000_0029_01C34AAC.B0468DB0--