rotate_left(items, k) that rotates items to the left by k positions and returns the new list. Elements that fall off the front reappear at the end. Handle k larger than len(items) by using the modulo of the length. Assume items is non-empty.items = [1, 2, 3, 4, 5], k = 2
[3, 4, 5, 1, 2]
The first two elements move to the end.
items = [1, 2, 3], k = 4
[2, 3, 1]
4 % 3 == 1, so this is a rotation by 1.
k %= len(items) avoids unnecessary full rotations.
items[k:] + items[:k] performs the rotation via slicing.