题解 | #参数解析#
参数解析
https://www.nowcoder.com/practice/668603dc307e4ef4bb07bcd0615ea677
### 有参考大佬的解法 s = input() # xcopy /s c:\\ d:\\e # xcopy /s "C:\\program files" "d:\" ls = [] if '"' not in s: for i in s.split(): ls.append(i) else: ss = s.split('"') for i in range(len(ss)): if i%2 == 1: # 引号里面分割出来位置总是奇数 ls.append(ss[i]) else: ls += ss[i].split() print(len(ls)) for k in ls: print(k)