方法一,使用[::-1]: s = 'python'print s[::-1] 方法二,使用reverse()方法: l = list(s)l.reverse()print ''.join(l) 输出结果: nohtyp nohtypPython 天天美味系列(总) Python 天天美味(6) - strip lstrip rstrip Python 天天美味(7) - 连接字符串(join %) Python 天天美味(8) - 字符串中的字符倒转 Python 天天美味(9) - translator Python 天天美味(10) - 除法小技巧 ... 相关文章: 2021-11-04 2021-11-28 2021-09-08 2021-05-19 2021-09-26 2022-12-23 2021-10-11 2021-06-08