提问
s=input("请输入节假日名称:")fo=open("PY301-vacations.csv","r")
ls = []
for line in fo:
ls.append(line.strip("\n".split(","))
fo.close()
for line in ls:
if s ==line:
print("{}的假期位于{}-{}之间".format(s,line,line)
为什么显示错误“invalid syntax"??
fo.close(?0 ls.append(line.strip("\n".split(",")))
这一行漏了右括号 zltzlt 发表于 2020-3-14 13:13
ls.append(line.strip("\n".split(",")))
这一行漏了右括号
哦哦哦,看到了,谢谢
页:
[1]