

l = [1,2,3,4,5,6,7,8]

print("General Syntax for iterations [startIdx:endIndx:stepSize]")

print("To show that idx starts from the end {0} . l[-1] should be -4".format(l[-1]))

print("Print all the numbers {0}".format(l[::]))

print("Print 0-4 {0}".format(l[0:4]))