2nd iteration of a character

Philippe Rousselot mailing at rousselot.rg
Sat Sep 20 17:27:23 EDT 2003


Hi,

How do I find the second iteration of a character in a string using python

this gives me the first one
f1 = string.find(line,sub)

this the last one
f2 = string.rfind(line,sub)

but for the nth one ?

Thanks in advance

Philippe

PS : any good book to recommend ?




More information about the Python-list mailing list