str.find for multiple strings

Peter Hansen peter at
Wed Feb 11 20:17:48 CET 2004

Bart Nessux wrote:
> x = str.find(temp, '120.50')
> I am looking for '120.50' '120.51' '122.78' etc. How can I do this with
> just one str.find... I can use re if I must, but I'd like to avoid it if
> possible.

In addition to Fecundo's questions, here's another.  What does "temp"
contain?  A single temperature string, or a temperature embedded in
a bunch of other stuff, or a whole series of temperatures, or what?


More information about the Python-list mailing list