You can combine multiple print statements per line using, in Python 2 and use the end argument to print function in Python 3.
Python2.x print "Hello", print " world" Python3.x print ("Hello", end='') print (" world")
This will give the output −
Hello world
Another thing you could do is put all the things in an array and call ''.join(array).
arr = ["Hello", "world"] print(' '.join(arr))
This will give the output −
Hello world