I was curious why this piece of code runs well in a terminal but in spyder, it throws the error TypeError: 'SLinkedList' object is not callable.
from itertools import combinations
l1 = [1,2,3,4]
result = []
for i in range(len(l1)+1):
c = combinations(l1, i)
for j in c:
#type(j) is <class 'tuple'>
result.append(list(j)) #error on doing list(j)
print(result)
Thanks in advance.
check whether you are overwriting "
list" object somewhere else in your full source code.