:g/{HTML(/norm jd/HTML^M
最后一个while语句似乎是问题,只是不知道为什么它不会前进到下一行
答案 0 :(得分:0)
您需要在 while 循环中重新分配字段。
while line != "":
count += 1
print("\n", count, " - Customer id:", field[0] , "\nWidgets ordered:", field[1], "\nGidgets ordered:", field[2], "\nDoodads ordered:", field[3] , end = "")
line = datafile.readline()
field = line.split(",")