I have a dictionary, and I want to use the items (key,value) to generate a single string, which I will pass argument to another script on the command line.
Snippet illustrates further:
args = { 'arg1': 100, 'arg2': 234 }
I want to create the string:
--arg1=100 --arg2=234
from the dictionary.
The naive (expensive) way to do that would be to loop through the items in the dictionary, building the string as I went along.
Is there a more pythonic way of doing this?