题解 | #字符逆序#

字符逆序

http://www.nowcoder.com/practice/cc57022cb4194697ac30bcb566aeb47b

Python,基本功需要扎实:

while True:
    try:
        string = str(input().strip())
        print(string[::-1])
    except:
        break
全部评论
print(input()[::-1])
5 回复 分享
发布于 2022-08-18 13:20 陕西
请问为什么要用strip()删除头尾的字符呀?
1 回复 分享
发布于 2023-08-19 11:22 新加坡

相关推荐

07-14 13:47
门头沟学院 Java
Lynn012:你评估好自己的位置了吗《顶尖应届》
投递小米集团等公司7个岗位
点赞 评论 收藏
分享
苍蓝星上艾露:这简历。。。可以试试我写的开源简历优化工具https://github.com/weicanie/prisma-ai
点赞 评论 收藏
分享
评论
45
6
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务