Reputation: 15770
Folks, cant seem to remember the correct syntax for displaying 2 or more variables in the following format:
log.debug ("%s %s " % hostname % processoutput[0])
Thanks!
Upvotes: 2
Views: 65
Reputation: 7180
You could also do:
log.debug('{0} {1}'.format(hostname, processoutput[0]))
This might look convoluted at first, but the format
function is pretty powerful. See documentation and examples.
Upvotes: 2