In [21]: str1=''
In [22]: for i in range(10):
...: str1=str1+str(i)
...:
In [23]: str1
Out[23]: '0123456789'
In [24]: str1[0:10]
Out[24]: '0123456789'
In [25]: str1[:10]
Out[25]: '0123456789'
In [27]: str1[:10]
Out[27]: '0123456789'
In [28]: str1[:]
Out[28]: '0123456789'
In [29]: str1[0:5:2]
Out[29]: '024'
In [31]: str1[::2]
Out[31]: '02468'
In [32]: str1[::-1]
Out[32]: '9876543210'
In [33]: str1[::-2]
Out[33]: '97531'