printing machine
Photo by Bank Phrom on Unsplash

If you want to print multiple things in the same line, you do not need to clutter everything with the plus operator, or do some type of conversion and then do the concatenation.

For that, we are going to use the help of the “end” parameter inside the print() method indicating the type of separator that you want to use between the items that you want to print.

First, let us see how does the default printing work in Python:

Now the following is going to print the same string:

They print the same values because the parameter “end” has “\n” as the default value.

In our case, we do not want to have a new line value of this parameter, but just an empty string:

We can also use other separator values like the following:


That’s it for this article.

I hope you find it useful.