Guest User

Untitled

a guest
Sep 21st, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. n =int(input())
  2. a=list()
  3. b=list()
  4.  
  5. for i in range(1,n+1):
  6. for j in range(1,i+1):
  7. if i%j==0 :
  8. b= b.append(j)
  9. a=a.append(b)
  10. print(a)
  11.  
  12. 10
  13. Traceback (most recent call last):
  14. File "E:/Projects/Chatbot/assign1.py", line 23, in <module>
  15. a=a.append(b)
  16. AttributeError: 'NoneType' object has no attribute 'append'
Add Comment
Please, Sign In to add comment