[python] add string rotation