I want to create a dictionary in Python where the keys are lists.
The issue I want to face is that I have a list of multiple integer values (from 1 to 300), and depending different value-ranges, I want to convert those into characters. For example:
- Values from 1 to 100 into character 'A'.
- Values from 101 to 200 into character 'B'.
- Values from 201 to 300 into character 'C'.
I tried this way but it didn't work:
dictionary = {[1, 100]:'A', [101, 200]:'B', [201, 300]:'C'}
But I get the error:
TypeError: unhashable type: 'list'
How could I do it?