【发布时间】:2017-08-13 19:51:09
【问题描述】:
在 python 问题中追加:
#other code irrelevant to q
if #code:
key3_lst = key3_lst.append(b.month)
b_w_dic[key3] = key3_lst
if #code:
key4_lst = key4_lst.append(b.month)
b_w_dic[key4] = key4_lst
return b_w_dic
我收到一条错误消息,说在 key3_lst = key3_lst.append(b.month) builtins.AttributeError: 'NoneType' object has no attribute 'append'
【问题讨论】:
标签: python list python-3.x class dictionary