#Shifts all elements one to the right and moves end value to the start li=li[-1:]+li[:-1]
def shiftRight(lst) : return lst[-1:] + lst[:-1] def shiftLeft(lst) : return lst[1:] + lst[:1]