题解 | #参数解析#
参数解析
https://www.nowcoder.com/practice/668603dc307e4ef4bb07bcd0615ea677
command = input() lst = command.split('"') #索引为奇数的元素在“”内 res = [] for i in range(len(lst)): if i % 2 == 0: res.extend(lst[i].split()) else: res.append(lst[i]) print(len(res)) for i in res: print(i)