Skip to content
Advertisement

build a set from 3 lists – Python

I’ve got below chunk and I need to define ‘Score’ as the intersection / union for each set of words in any given two lists. I understand & and | could only be used in sets. From studytonight I get that below code shoud work but it’s gving me > TypeError: unhashable type: ‘list’

JavaScript

Could someone please correct my mistake?

JavaScript
JavaScript

Advertisement

Answer

You should use:

JavaScript

or

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement