How to find if a string contains another string

Borse, Ganesh ganesh.borse at
Tue Oct 30 05:01:57 CET 2007


Am new to python.
May someone please help me know this?

How can we check whether one big string contains another small string?

bigstring="python anaconda boa cobra"

If 0 == contains(bigstring,smallone):
        print "Yes, boa is snake.."

Is there any function like "contains" or "exists" in python?
What are different alternatives we have?

Please help.

Thanks and Regards,

Please access the attached hyperlink for an important electronic communications disclaimer:

More information about the Python-list mailing list