Sto cercando di eseguire questo codice dove ho una lista di liste. Ho bisogno di aggiungere alle liste interne, ma ottengo l'errore
TypeError: 'list' object is not callable.
Qualcuno può dirmi cosa sto facendo di sbagliato qui.
def createlists():
global maxchar
global minchar
global worddict
global wordlists
for i in range(minchar, maxchar + 1):
wordlists.insert(i, list())
#add data to list now
for words in worddict.keys():
print words
print wordlists(len(words)) # <--- Error here.
(wordlists(len(words))).append(words) # <-- Error here too
print "adding word " + words + " at " + str(wordlists(len(words)))
print wordlists(5)