Slicing is yet another super practical aspect of Python. It makes accessing strings, lists and tuples partially very effortless.
There are a few rules you need to follow while slicing data in Python and it will be beneficial for you to learn these by heart. Repeat as much as needed to gain confidence in Python Slicing.
Let’s say you have a list: lst = [1,2,3,4,5]
Ex. 1:
If you slice it as: lst[1:3]
You will get: [2,3]
Index starts at zero, start is inclusive but stop is exclusive.