super quick question

jwoolard johannes.wollard at gmail.com
Fri Aug 4 17:30:52 EDT 2006


Chris wrote:
> is there a prettier way to do this?
> string[:len(string)-1]
>
> thanks!

string[:-1]

Negative indices count from the end of the string! beautiful isn't it?




More information about the Python-list mailing list