def map_keys(dikt, func):
 return dict(((func(key), value) for (key, value) in six.iteritems(dikt)))

def map_keys ( dikt , func ) : return dict ( ( ( func ( key ) , value ) for ( key , value ) in six . iteritems ( dikt ) ) )
map dictionary keys .