1.
import sys sys.stdout.write("Hello")
2.
from __future__ import print_function print("Hello",end="")
Normally, end="\n" and print is not a function that means after string it will be add "\n" at the end. Using __future__ to import print as function.
Now, we can print without a new line.
No comments:
Post a Comment