XYZ interview question

Write program for slicing in python of list