Iterating Dictionaries in a Function
John Hunter
jdhunter at ace.bsd.uchicago.edu
Sat May 8 09:20:16 EDT 2004
>>>>> "Michael" == Michael Geary <Mike at DeleteThis.Geary.com> writes:
Michael> It looks like you want to do a case-insensitive lookup in
Michael> the dict. The way to handle this would be to convert keys
Michael> to uppercase or lowercase when you enter them into the
Michael> dict, and do the same with values that you look up.
Or better yet, use the case insensitive dictionary recipe at
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/66315
JDH
More information about the Python-list
mailing list