Which is faster?

Aggelos I. Orfanakos aorfanakos at gmail.com
Wed Jan 26 21:40:02 EST 2005


Any idea which of the following is faster?

'a/b/c/'[:-1]

or

'a/b/c/'.rstrip('/')

Thanks in advance.

P.S. I could time it but I thought of trying my luck here first, in
case someone knows already, and of course the reason.




More information about the Python-list mailing list