Rotate Array Code In Python