searching strings

Discussion in 'Python' started by Daniel Dalton, Mar 10, 2009.

  1. 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 return true... How do I do this?

    Thanks,

    Daniel.
     
    Daniel Dalton, Mar 10, 2009
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Chris
    Replies:
    5
    Views:
    8,057
    Christopher R. Barry
    Oct 11, 2003
  2. burchill

    searching strings

    burchill, Dec 1, 2004, in forum: Java
    Replies:
    4
    Views:
    484
    Babu Kalakrishnan
    Dec 7, 2004
  3. tgiles
    Replies:
    4
    Views:
    321
    Dennis Lee Bieber
    Jun 15, 2004
  4. Ben

    Strings, Strings and Damned Strings

    Ben, Jun 22, 2006, in forum: C Programming
    Replies:
    14
    Views:
    767
    Malcolm
    Jun 24, 2006
  5. stumblng.tumblr
    Replies:
    1
    Views:
    208
    stumblng.tumblr
    Feb 4, 2008
Loading...

Share This Page