Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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)
- 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'
Add Comment
Please, Sign In to add comment