题解 | #单词倒排#

单词倒排

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

import re 


def my_func(in_str):
    res = re.sub("[^a-zA-Z]", " ", in_str)
    res = " ".join(res.split(" ")[::-1])
    return res

while True:
    try:
        print(my_func(input()))
    except (KeyboardInterrupt, EOFError):
        break
全部评论

相关推荐

点赞 评论 收藏
分享
评论
1
收藏
分享

创作者周榜

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