题解 | #参数解析#
参数解析
https://www.nowcoder.com/practice/668603dc307e4ef4bb07bcd0615ea677
try:
a=input()
import re
def func(match):
return match[0].strip('"').replace(' ','@')
a_x=re.sub(r'".*?"',func,a)
l=a_x.split()
print(len(l))
for ele in l:
print(ele.replace('@',' '))
except:
pass
a=input()
import re
def func(match):
return match[0].strip('"').replace(' ','@')
a_x=re.sub(r'".*?"',func,a)
l=a_x.split()
print(len(l))
for ele in l:
print(ele.replace('@',' '))
except:
pass