题解 | #单词倒排#

单词倒排

http://www.nowcoder.com/practice/81544a4989df4109b33c2d65037c5836

# 字符串的处理与拼接

str = input()
out = ''
for i in str:
    if not (i.isspace()&nbs***bsp;i.isalpha()):
        i = ' '
    out = out + i
lst = out.split()
print(' '.join(lst[::-1]))

全部评论

相关推荐

05-13 02:01
已编辑
惠州学院 前端工程师
安静的少年在求佛:建议把公司名字写到标题。以后有人想搜就能直接搜到
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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