Re: searching strings

2009-03-09 Thread Gabriel Genellina
En Mon, 09 Mar 2009 23:18:50 -0200, Daniel Dalton escribió: I'm writing a program where I search a variable (path), and see if it contains the whole string of variable name so: if name in path: else: One question about this, how can I make it do exactly what it's doing now, exc

Re: searching strings

2009-03-09 Thread Daniel Dalton
On Mon, Mar 09, 2009 at 06:24:24PM -0700, Chris Rebert wrote: > Normalize the case of the strings: > > i.lower() in j.lower() Too easy, thanks very much! Cheers, Daniel. -- http://mail.python.org/mailman/listinfo/python-list

Re: searching strings

2009-03-09 Thread Chris Rebert
On Mon, Mar 9, 2009 at 6:18 PM, Daniel Dalton wrote: > Hi, > > I'm writing a program where I search a variable (path), and see if it > contains the whole string of variable name > so: > if name in path: >   > else: >   > > One question about this, how can I make it do exactly what it's doi

searching strings

2009-03-09 Thread Daniel Dalton
Hi, I'm writing a program where I search a variable (path), and see if it contains the whole string of variable name so: if name in path: else: One question about this, how can I make it do exactly what it's doing now, except ignore case? eg. if I do this: i="A" j="ab" i in j should