Write a function swap_at_index(items, k) that breaks the tuple items into two parts
at index k and returns a new tuple with the two parts swapped. The element at index k
belongs to the first part, so it ends up at the end of the result.
k is a valid index of items.
Example
swap_at_index((1, 2, 3, 4, 5), 2) -> (4, 5, 1, 2, 3)
Implement this function:
def swap_at_index(items: tuple, k: int) -> tuple:
Write the function only — the arguments are read for you and the return value is printed automatically.
Arguments arrive as one Python literal per line, in this order: items, k.
Input
(1, 2, 3, 4, 5)
2
Output
(4, 5, 1, 2, 3)