how to find whether a string in a another string..

Posted by zjm1126 on Stack Overflow See other posts from Stack Overflow or by zjm1126
Published on 2010-04-07T06:48:26Z Indexed on 2010/04/07 6:53 UTC
Read the original article Hit count: 238

Filed under:
|
a='1234;5'
print a.index('s')

thr error is :

> "D:\Python25\pythonw.exe"  "D:\zjm_code\kml\a.py" 
Traceback (most recent call last):
  File "D:\zjm_code\kml\a.py", line 4, in <module>
    print a.index('s')
ValueError: substring not found

thanks

© Stack Overflow or respective owner

Related posts about python

Related posts about string