> I would like to check if a certain word exists in a given string.  
> since I learned to love lists, I used
> 
> if myword in mystring:
> 
> ...didnt work. I have now resorted to
> 

Which version of Python?

>>> 'boo' in 'mybigbooboo'
True
>>>

Works for me in Python 2.4...

Alan G.
(Regular readers will note I now have 2.4 installed! :-)
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to