def collatz_list(n):
int_list = [n]
int_index = n
while int_index >1 :
if int_index % 2 == 0:
int_index = int_index / 2
int_list = int_list.append(int_index)
else:
int_index = 3 * int_index 1
int_list = int_list.append(int_index)
return int_list
为什么当我运行它时,结果是NoneType
对象没有属性append