Extending indexing In Python, indexing syntax can be used as a substitute for the slice object. This is an easy and convenient way to slice a string both syntax wise and execution wise.
Syntax- string[start:end:step] start, end and step have the same mechanism as slice() constructor.