Rotate an Array K Times in Python