Looking for a way to write the dictionary constant.
For example,
EXAMPLE = {0~10: 'low', 11-20: 'medium', 21:30: 'high}
is there a way to code 0~10 where I can do EXAMPLE[5] and it will output 'low'?
Looking for a way to write the dictionary constant.
For example,
EXAMPLE = {0~10: 'low', 11-20: 'medium', 21:30: 'high}
is there a way to code 0~10 where I can do EXAMPLE[5] and it will output 'low'?