immutable numbers: numbers as dictionary key



examples/dictionary/numbers.py
number = {
    23   : "Twenty three",
    17   : "Seventeen",
    3.14 : "Three dot fourteen",
    42   : "The answer",
}

print(number)
print(number[42])
print(number[3.14])

{23: 'Twenty three', 17: 'Seventeen', 3.14: 'Three dot fourteen', 42: 'The answer'}
The answer
Three dot fourteen