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

在写python脚本时遇到AttributeError: ‘NoneType’ object has no attribute ‘append’

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

原因:因为没有返回值

猜你喜欢

转载自blog.csdn.net/zhizhengguan/article/details/130127267
今日推荐