How to overcome TypeError: unhashable type: ‘list’
As indicated by the other answers, the error is to due to k = list[0:j], where your key is converted to a list. One thing you could try is reworking your code to take advantage of the split function: # Using with ensures that the file is properly closed when you’re done with open(‘filename.txt’, ‘rb’) … Read more