题解 | #参数解析#

参数解析

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

while True:
    try:
        words= input()
    except:
        break
    else:
        str1= str(words)
        str1=str1.replace(' ', '\n')
        e=''
        flag=False
        for i in str1:
            if i== '"':
                flag = not flag
            elif flag==True and i== '\n':
                e+=' '
            else:
                e+=i
        b=e.count('\n')+1
        print(b)
        print(e)
        
        
                
        
        
                    
                    
          
全部评论

相关推荐

09-26 19:45
门头沟学院 Java
点赞 评论 收藏
分享
11-07 16:07
深圳大学 运营
前端飞升:学长,阿里不是卡双非吗,我深也能去吗
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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