I have two variables holding the ouputs from using subprocess output and want the output of the both variable to be printed into one line..
below is the details..
cmd1=subprocess.Popen("some_command", shell=True, stdout=subprocess.PIPE)
cmd_input1=cmd1.stdout.read().decode('utf8')
cmd_input1 has:
one
two
three
four
cmd2=subprocess.Popen("othere_command", shell=True, stdout=subprocess.PIPE)
cmd_input2=cmd2.stdout.read().decode('utf8')
while cmd_input2 has :
1
2
3
4
I need the print output of both the variables into one line, line below..
one 1
two 2
three 3
four 4
I tried below but not working.. i just started learning python..
print("% %." % (cmd_input1, cmd_input2)
Its python3 , please guide..
print(cmd_input1, str(cmd_input2))