这个感觉没问题,为啥有报错
template='{l} {i} {s},{y} {n} {p}.'
l1='life'
i1='is'
s1='short'
y1='you'
n1='need'
p1='python'
l=l1
i=i1
s=s1
y=y1
n=n1
p=p1
result=template.format(l,i,s,y,n,p)
print(result)
template='{l} {i} {s},{y} {n} {p}.'
l1='life'
i1='is'
s1='short'
y1='you'
n1='need'
p1='python'
l=l1
i=i1
s=s1
y=y1
n=n1
p=p1
result=template.format(l,i,s,y,n,p)
print(result)
2021-09-15
举报