print in Python 3
- end
- sep
print("hello")
print("world")
print("Foo", "Bar")
hello
world
Foo Bar
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.
print("hello", end="")
print("world")
print("Foo", "Bar", sep="")
print("END")
helloworld
FooBar
END
sep
will set the character separating values.