[英]IndentationError: expected an indented block where?
File "<ipython-input-9-80002b11f2f7>", line 16
linest = i.strip().split(",")
^
不知道该怎么做或我必须在哪里设置第 16 行?
with open("names.csv", "r") as file:
name = "Annie"
state = "AK"
gender = "F"
xs = []
ys = []
counter = 0
for i in file:
counter += 1
if counter >= 5:
linest = i.strip().split(",")
if linest[1] == name and linest[4] == state and linest[3] == gender:
print (linest)
xs.append(linest[1])
ys.append(linest[3])
print(xs)
print(ys)
if counter >= 5:
语句中没有任何内容。 这就是为什么你有一个缩进错误。 在此处插入 pass 语句或其他代码。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.