I'm trying to create list of factors using index.
n =int(input())
a=list()
b=list()
for i in range(1,n+1):
for j in range(1,i+1):
if i%j==0 :
b= b.append(j)
a=a.append(b)
print(a)
getting error message as follow:
10
Traceback (most recent call last):
File "E:/Projects/Chatbot/assign1.py", line 23, in <module>
a=a.append(b)
AttributeError: 'NoneType' object has no attribute 'append'