[Tutor] IndexError: string index out of range

Liam Clarke cyresse at gmail.com
Wed Nov 3 13:30:22 CET 2004


Danny, you wouldn't want to clarify a syntax thing would you?

> >>>> message[::-1]
>>> message[3:7:-1]

In the above, the[ ::-1] just defaults to [0:end of string:step]? 

Regards,

Liam Clarke

-- 
'There is only one basic human right, and that is to do as you damn well please.
And with it comes the only basic human duty, to take the consequences.


More information about the Tutor mailing list