Python Strings Slicings

A slice represents a part or piece of a string. The format of slicing is:

stringname[start: stop: stepsize]

If 'start' and 'stop' are not specified, then slicing is done from 0th to n-1th elements. If 'stepsize' is not written, then it is taken to be 1.

str = 'Core Python'

str = 'Core Python'

example image for slicing string