What's the difference between these 2 statements?

Reinhold Birkenfeld reinhold-birkenfeld-nospam at wolke7.net
Wed Apr 20 14:53:31 EDT 2005


ATSkyWalker wrote:
> What's the difference between these 2 statements?
> 
> If you have a String s="12345"
> 
> s[len(s)::-1] = "54321"
> 
> But
> 
> s[len(s):0:-1] = "5432"
> 
> Why? What's the difference? What number then can I use as the end of
> the slice if I were to supply all 3 parameters?

-1.

Reinhold



More information about the Python-list mailing list