技术文章 > 后端开发 > Python教程
方法一,使用[::-1]: s = 'python' print s[::-1] 方法二,使用reverse()方法: l = list(s) l.reverse() print ''.join(l) 输出结果: nohtyp nohtyp
已抢23632个
已抢118095个
已抢139396个
已抢6279个
已抢36200个
已抢66765个