python:python提示AttributeError: ‘NoneType‘ object has no attribute ‘append‘

Encountered AttributeError: 'NoneType' object has no attribute 'append' when writing a python script

a=[]
b=[1,2,3,4]
a = a.append(b) '''会报错,改为a.append(b)'''

Reason: because there is no return value

Guess you like

Origin blog.csdn.net/zhizhengguan/article/details/130127267