WritingpythonEncountered while scriptingAttributeError: 'NoneType' object has no attribute 'append'
a=[]
b=[1,2,3,4]
a = (b)
After execution, it is foundaThe type ofNoneType。
The next time you execute it, the error as shown in the question will appear。
Bundlea = (b)Change to(b)The problem was solved later。 reason:appendWill be modifiedaitself,And returnNone。不能Bundle返回值再赋值给a。