Example 1 — Control Separators and Line Endings
Change the separator, print without a newline, and add a blank line.
print("a", "b", "c")
print("a", "b", "c", sep="-")
print("2024", "03", "09", sep="/")
print("Loading", end="")
print("...", end=" ")
print("done")
print()
print("after a blank line") How It Works
- Default spacing. Without keywords, values are joined with one space and the line ends with a newline.
- Custom sep.
sep="-"andsep="/"replace the space between values. - Staying on one line.
end=""andend=" "stop the newline, so three calls buildLoading... done. - Empty print.
print()writes just the newline, producing a blank line.

