题解 | #参数解析#
参数解析
https://www.nowcoder.com/practice/668603dc307e4ef4bb07bcd0615ea677
import re import shlex while True: try: strings = input() lex = shlex.shlex(strings) lex.quotes = '"' lex.whitespace_split = True result_list = list(lex) print(len(result_list)) for result in result_list: print(result.strip('"')) except: break