Compare string with all values in array
        Posted  
        
            by Hallik
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Hallik
        
        
        
        Published on 2010-05-06T19:49:12Z
        Indexed on 
            2010/05/06
            19:58 UTC
        
        
        Read the original article
        Hit count: 226
        
python
I am trying to fumble through python, and learn the best way to do things. I have a string where I am doing a compare with another string to see if there is a match:
if paid[j].find(d)>=0:
    #BLAH BLAH
If 'd' were an array, what is the most efficient way to see if the string contained in paid[j] has a match to any value in 'd'?
© Stack Overflow or respective owner