Rotate list right by k positions in place. Example: [1,2,3,4,5], k=2 => [4,5,1,2,3] The list is non-empty.
Implement this function:
def rotate_list_right(l: list, k: int) -> None:
Write the function only — the arguments are read for you and the return value is printed automatically.
This function changes its argument in place and returns nothing; the updated l is what gets printed.
Arguments arrive as one Python literal per line, in this order: l, k.
Input
[1, 2, 3, 4, 5]
2
Output
[4, 5, 1, 2, 3]