If you have already tried printing a statement in Python, you have probably seen that you are going to get a new line after you execute it.
Let’s see a quick example:
The output of this will be the following:
First
Second
Third
So, why new lines are being shown for each print?
The answer is because the print() function has a parameter end=“” which by default includes an ending symbol that represents the new line, “\n”.
Even if we add “\n” in the print() function, we are going to get the same results as above:
We can also use other symbols, and not just the ones that we have used here, such as:
Now the output result will be the following:
First | Second | Third
That’s it for this article. I hope you find this valuable.