[Patrick K. O'Brien] > > I don't see the logic in this and I couldn't find anything in the docs to > explain this behavior. I'm guessing this is old hat for most of you, but I > find this a bit surprising myself. This one is even more fun. (Apologies in advance if I'm pouring salt on old wounds.) >>> s = 'help' >>> s.rfind('') 4 >>> s[s.rfind('')] Traceback (most recent call last): File "<input>", line 1, in ? IndexError: string index out of range >>> -- Patrick K. O'Brien Orbtech ----------------------------------------------- "Your source for Python programming expertise." ----------------------------------------------- Web: http://www.orbtech.com/web/pobrien/ Blog: http://www.orbtech.com/blog/pobrien/ Wiki: http://www.orbtech.com/wiki/PatrickOBrien -----------------------------------------------
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4