Peter Otten <__pete...@web.de> writes:

> OP: you may be looking for
>
>>>> a = "a bb ccc"
>>>> a[::-1].find(" ")
> 3


But you should be aware of the effeciency implications of doing
this. a[::-1] constructs a new list. It's probably faster to do e.g.:
len(a) - a.rfind(..) - 1
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to