报错AttributeError: 'NoneType' object has no attribute 'append' end = end.append(num) 改成 end.append(num)