rfind bug ?
__peter__ at web.de
Wed Apr 21 05:15:42 EDT 2010
Chris Rebert wrote:
[didn't see the original message]
> On Wed, Apr 21, 2010 at 1:51 AM, Stef Mientki <stef.mientki at gmail.com>
>> With the following code, I would expect a result of 5 !!
>>>>> a= 'word1 word2 word3'
>>>>> a.rfind(' ',7)
>> Is this a bug ?
> No. Don't you think someone would have found such an obvious bug by now?
OP: you may be looking for
>>> a = "a bb ccc"
>>> a[::-1].find(" ")
More information about the Python-list