"TypeError: 'set' object is not callable"
This error indicates that you may have defined a set with the variable name as set
, if you did so, that would overwrite the built-in
function set
.
Example of this issue occuring -
>>> set = set([1,2,3,4,5])
>>> my_set = set([2,3,4,5,6])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'set' object is not callable