Guest User

Untitled

a guest
Jul 23rd, 2018
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. a = set(["Blah", "Hello"])
  2. a = list(a)
  3.  
  4. TypeError: 'set' object is not callable
  5.  
  6. for item in set1:
  7. list.append(item)
  8.  
  9. >>> a = set(["Blah", "Hello"])
  10. >>> a = list(a) # You probably wrote a = list(a()) here or list = set() above
  11. >>> a
  12. ['Blah', 'Hello']
  13.  
  14. >>> assert isinstance(list, type)
  15.  
  16. >>> set=set()
  17. >>> set=set()
  18. Traceback (most recent call last):
  19. File "<stdin>", line 1, in <module>
  20. TypeError: 'set' object is not callable
  21.  
  22. >>> a=set()
  23. >>> b=a()
  24. Traceback (most recent call last):
  25. File "<stdin>", line 1, in <module>
  26. TypeError: 'set' object is not callable
  27.  
  28. a = set(["Blah", "Hello"])
  29. a = list(a)
  30. type(a)
  31. <class 'list'>
Add Comment
Please, Sign In to add comment