Case insensitive dictionary?

Elbert Lev elbertlev at
Fri Jun 25 19:21:21 CEST 2004


Here is the problem:

I have a dictionary. Keys are strings. How to make dictionary  lookup
case insensitive?

In other words:
If dict = {'First":"Bob", "Last":"Tom"}, dict["first"] should return

Maybe dictionary is not the right data type? If so what is?

More information about the Python-list mailing list