scamp_extensions.utilities.sequences.cyclic_slice

scamp_extensions.utilities.sequences.cyclic_slice(l: Sequence, start: int, end: int) Sequence[source]

Takes a slice that loops back to the beginning if end is before start

Parameters:
  • l – the list to slice

  • start – start index

  • end – end index

Returns:

list representing the cyclic slice