def rotN(l, N):
 assert (len(l) >= N), "Can't rotate list by longer than its length."
 return (l[N:] + l[:N])

def rotN ( l , N ) : assert ( len ( l ) >= N ) , "Can't rotate list by longer than its length." return ( l [ N : ] + l [ : N ] )
rotate a list of elements .