Rotate the line

Write rotate(line, k) that moves the front person of a deque to the back, k times over, and returns the same deque, changed in place. k may be larger than the line, or zero.

rotate(deque(["a", "b", "c"]), 1)  ->  deque(["b", "c", "a"])
rotate(deque(["a", "b", "c"]), 3)  ->  deque(["a", "b", "c"])
rotate(deque(["a", "b", "c"]), 4)  ->  deque(["b", "c", "a"])
from collections import deque

def rotate(line, k):
    ...