首先将文本变成列表列表。这将负责解析部分:
lol = list(csv.reader(open('text.txt', 'rb'), delimiter='t'))其余工作可以通过索引查找完成:
d = dict()key = lol[6][0] # cell A7value = lol[6][3] # cell D7d[key] = value # add the entry to the dictionary ...

首先将文本变成列表列表。这将负责解析部分:
lol = list(csv.reader(open('text.txt', 'rb'), delimiter='t'))其余工作可以通过索引查找完成:
d = dict()key = lol[6][0] # cell A7value = lol[6][3] # cell D7d[key] = value # add the entry to the dictionary ...