[Tutor] SLICING

kenneth yashim kzamani44 at gmail.com
Fri Jun 15 09:57:47 EDT 2018


please im new to python or any other programming language. please i want to
understand how slicing works

    [start,stop,step]

>>> 'abc'[0:3]
'abc'

>>>'abc'[0:-1]
'ab'

why does 'abc'[2:1]  or 'abc'[2:1] print ' ' instead of 'c'???


More information about the Tutor mailing list