Given:k = {'MASTER_HOST': '10.178.226.196', 'MASTER_PORT': 9999}I want to flatten into the string:MASTER_HOST='10.178.226.196', MASTER_PORT=9999This is the ugly way that I'm achieving this right now:result = []for i,j in k.iteritems():    if isinstance(j, int):        result.append('%s=%d' % (i,j))    else:        result.append(%s='%s' % (i,j))', '.join(result)I'm sure my developer colleagues are going to chastize me for this code. Surely there is a better way.
Flattening a dictionary into a string
python;strings