Pass parameter one time, but use more times
- by Gabriel L. Oliveira
I'm trying to do this:
commands = { 'py': 'python %s', 'md': 'markdown "%s" "%s.html"; gnome-open "%s.html"', }
commands['md'] % 'file.md'
But like you see, the commmands['md'] uses the parameter 3 times, but the commands['py'] just use once. How can I repeat the parameter without changing the last line (so, just passing the parameter one time?)