当我编码时:
for key, value in d.items():
d[key].append([])
它说,
AttributeError: 'int' object has no attribute 'append'
我不明白这个错误信息。这里的int对象是什么以及如何编写将空列表添加到字典值的代码?
当我编码时:
for key, value in d.items():
d[key].append([])
它说,
AttributeError: 'int' object has no attribute 'append'
我不明白这个错误信息。这里的int对象是什么以及如何编写将空列表添加到字典值的代码?