dictionaries and files: when I use defaultdict the normal dict doesn't work and vice verse. Why?

后端 未结 0 1323
我在风中等你
我在风中等你 2020-12-08 01:55
from collections import defaultdict
d = {}
with open("sample.log") as samp:
    for line in samp:
        if line.split():
            parts = line.split()         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题