def contains_case_insensitive ( adict , akey ) : for key in adict : if key . lower ( ) == akey . lower ( ) : return True return False
how to check for lower case values in python
Check if key is in adict . The search is case insensitive .
def contains_case_insensitive(adict, akey):
    """Check if key is in adict. The search is case insensitive."""
    for key in adict:
        if key.lower() == akey.lower():
            return True
    return False