I have a list:
list1=[]
the length of the list is undetermined so I am trying to append objects to the end of list1 like such:
for i in range(0, n):
list1=list1.append([i])
But my output keeps giving this error: AttributeError: 'NoneType' object has no attribute 'append'
Is this because list1 starts off as an empty list? How do I fix this error?