题解 | #参数解析#
参数解析
https://www.nowcoder.com/practice/668603dc307e4ef4bb07bcd0615ea677
import re s = input() tmp = re.findall('\"(.*?)\"', s) res = re.sub('\"(.*?)\"', "哈哈", s).split(" ") print(len(res)) for i in range(len(res)): if res[i] == "哈哈": t = tmp.pop(0) res.pop(i) res.insert(i, t) for i in res: print(i)