Python - 3 string need to be printed in same line. Please help!!
Please find the script and output, help me with the simple requirement! Required output is in single line, like /var/tmp/servername012017-07-17 ##########Script############ import subprocess import os import datetime import sys cdate = datetime.date.today() from subprocess import PIPE, run def out(command): result = run(command, stdout=PIPE, stderr=PIPE, universal_newlines=True, shell=True) return result.stdout path = '/var/tmp/' hname = out("uname -n") print (str(path) + str(hname) + str(cdate)) ############Output############## /var/tmp/servername01 2017-07-17 ############################### Required output is in single line, like /var/tmp/servername012017-07-17 ############################### Please help!! Thanks in advance