题解 | #字符串反转python3#
字符串反转
http://www.nowcoder.com/practice/e45e078701ab4e4cb49393ae30f1bb04
- 1.用reversed函数
print(''.join(reversed(input())))
2.切片函数
print(input()[::-])
字符串反转
http://www.nowcoder.com/practice/e45e078701ab4e4cb49393ae30f1bb04
print(''.join(reversed(input())))
2.切片函数
print(input()[::-])
相关推荐