print in Python 3



examples/basics/print3.py
print("hello")
print("world")
print("Foo", "Bar")

hello
world
Foo Bar


examples/basics/print3_no_newline.py
print("hello", end=" ")
print("world")
print("Foo", "Bar")

print("hello", end="")
print("world")


print("hello", end="-")
print("world")

hello world
Foo Bar
helloworld
hello-world

end will set the character added at the end of each print statement.


examples/basics/print3_no_newline_no_space.py
print("hello", end="")
print("world")

print("Foo", "Bar", sep="")
print("END")

helloworld
FooBar
END

sep will set the character separating values.