scamp.utilities.rotate

scamp.utilities.rotate(l: list, n: int) list[source]

Rotates a list such that it starts at the nth index and loops back to end at the (n-1)st

Parameters:
  • l – the input list

  • n – the new start index

Returns:

the rotated list