On Mon, Sep 20, 2010 at 12:58 PM, rudikk00 <rudik...@yahoo.com> wrote:
> Hi all, > > I remember perl has a match function =~/H/ --> which searches if there > is "H" pattern in line. Is there a reasonable analog of it in python? > Yes, have a look at the re module in the standard library. If all you're interested in is exact matches and not regular expressions, you can also use the "in" operator: if "H" in my_string: do_something() Cheers, Ian
-- http://mail.python.org/mailman/listinfo/python-list