help regarding re.search

Sagar Neve nevesagar at gmail.com
Thu Sep 15 06:41:53 CEST 2011


Here is the code


url="http://xy.yz.com/us/r1000/012/Purple/b1/c6/e2/mzm.dxkjsfbl..d2.dpkg.ipa
"

Man_Param="/us/r1000"
Opt_Param1="Purple"
Opt_Param2="dpkg.ipa"

if (Opt_Param2 in url):
    print "hello."
else:
    print "bye."

It  gives me:

./sample.py: line 9: syntax error near unexpected token `:'
./sample.py: line 9: `if (Opt_Param2 in url):    '


Help.


On Thu, Sep 15, 2011 at 9:05 AM, Chris Rebert <clp2 at rebertia.com> wrote:

> On Wed, Sep 14, 2011 at 8:33 PM, Sagar Neve <nevesagar at gmail.com> wrote:
> > If A in B:
> > does nt seem to be working.
> > Am I missing something here.
>
> Please provide a snippet of the code in question, and be specific
> about how it's not working.
>
> Cheers,
> Chris
> --
> http://rebertia.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20110915/2fd52089/attachment.html>


More information about the Python-list mailing list