def case_insensitive_update(dct1, dct2):
 lowkeys = dict([(key.lower(), key) for key in dct1])
 for (key, val) in dct2.items():
  d1_key = lowkeys.get(key.lower(), key)
  dct1[d1_key] = val

def case_insensitive_update ( dct1 , dct2 ) : lowkeys = dict ( [ ( key . lower ( ) , key ) for key in dct1 ] ) for ( key , val ) in dct2 . items ( ) : d1_key = lowkeys . get ( key . lower ( ) , key ) dct1 [ d1_key ] = val
given two dicts .