def convert_keys_to_string(dictionary):
 if (not isinstance(dictionary, dict)):
  return dictionary
 return dict(((str(k), convert_keys_to_string(v)) for (k, v) in dictionary.items()))

def convert_keys_to_string ( dictionary ) : if ( not isinstance ( dictionary , dict ) ) : return dictionary return dict ( ( ( str ( k ) , convert_keys_to_string ( v ) ) for ( k , v ) in dictionary . items ( ) ) )
recursively converts dictionary keys to strings .