def lowercase_keys(mapping):
 items = mapping.items()
 for (key, value) in items:
  del mapping[key]
  mapping[key.lower()] = value

def lowercase_keys ( mapping ) : items = mapping . items ( ) for ( key , value ) in items : del mapping [ key ] mapping [ key . lower ( ) ] = value
converts the values of the keys in mapping to lowercase .