Getting last char in string.

Alex Martelli aleax at
Thu Sep 26 13:50:46 CEST 2002

CheapSkate wrote:
> if s[-1] returns a single element, why woulnd't it return " ?
> Single character are strings of length 1(as u said) and " is single
> character right?

Nope: '', the empty string, is 0 characters, not 1 character.


More information about the Python-list mailing list