On Feb 10, 11:58 am, Larry Bates <[EMAIL PROTECTED]> wrote: > rshepard-at-appl-ecosys.com wrote: > > On 2007-02-10, [EMAIL PROTECTED] wrote: > > >> if item == selName: > > > Slicing doesn't seem to do anything -- if I've done it correctly. I > > changed the above to read, > > > if item[2:-2] == selName: > > > but the output's the same. > > > Rich > > Use the interpreter to test things: > > a="(u'ground water',)" > > a[2:-2] > "'ground water'" > > a[3:-3] > 'ground water' > > That is what you are looking for.
True. Unfortunately he was looking for the wrong thing. He has: a = (u'ground water', ) a[2:-2] -> () a[3:-3] -> () () == 'ground water' -> False HTH, John -- http://mail.python.org/mailman/listinfo/python-list