题解 | #参数解析#

参数解析

https://www.nowcoder.com/practice/668603dc307e4ef4bb07bcd0615ea677

try:
    a=input()
    import re
    def func(match):
        return match[0].strip('"').replace(' ','@')
    a_x=re.sub(r'".*?"',func,a)
    l=a_x.split()
    print(len(l))
    for ele in l:
        print(ele.replace('@',' '))
except:
    pass
全部评论

相关推荐

评论
点赞
1
分享

创作者周榜

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