The first time I run this block of code from Notebook it works fine:
#Which letters and how many
letters = ["a","b","c"]
noOfLetters = len(letters)#Looking for all permutations
resultA = []
from itertools import permutations
for i in range(noOfLetters):resultA.append(list(permutations(letters,i+1)))
If I run it again (without restarting the Kernel) I get the following error:
TypeError Traceback (most recent call last)
<ipython-input-5-4050a4ce7a36> in <module>()7 from itertools import permutations8 for i in range(noOfLetters):
----> 9 resultA.append(list(permutations(letters,i+1)))TypeError: 'list' object is not callable