Python字符串中的字符倒转 方法一,使用[::-1]: s = 'python' print s[::-1] 方法二,使用reverse()方法: l = list(s) l.reverse() print ''.join(l) 输出结果: nohtyp nohtyp 查看更多关于Python字符串中的字符倒转的详细内容... 声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://www.haodehen.cn/did87203 更新时间:2022-10-19 阅读:79次