Home › Forums › Python Programming › Data structures in python continued.. (strings) .. [P-2] › Reply To: Data structures in python continued.. (strings) .. [P-2]
January 13, 2014 at 6:46 am
#2107
Keymaster
Some more slicing examples:
>>> str= "humble" >>> str[::-2] 'ebu' >>> str[::2] 'hml' >>> str[1:2] 'u' >>> str[1::] 'umble' >>> str[::3] 'hb' >>> str[:3] 'hum' >>>