You can use the print function
>>> from __future__ import print_function >>> print('hel', end=''); print('lo', end='') hello
Obviously, the semicolon is in the code only to display the result in the interactive interpreter.
The end keyword parameter for the print function indicates what you want to print after the main text. The default value is '\n' . Here we change it to '' so that nothing is printed at the end.
source share