[Python3] fix bug with revstring