On 08/10/12 17:43, Benjamin Fishbein wrote:
I figured out a solution for the question I asked on here.
To find the next digit (0-9) in a string, I use:
text.find("0" or "1" or "2", etc.......)

Are you sure that worked? It doesn't for me on Python 2.7...

>>> s
'a string with 7 words in it'
>>> s.find('4' or '5' or '7')
-1
>>> s.find('7')
14


--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to