Home>Article>Backend Development> What does end mean in python

What does end mean in python

(*-*)浩
(*-*)浩 Original
2019-08-02 09:39:59 74737browse

The end in python is the parameter in the print function. Pass a string for the end end, so that the print function will not add a newline character at the end of the string, but add a string. In fact, this is also a Grammatical requirements, indicating that this statement is not over.

What does end mean in python

end means ending with the given string or tab character, but does not default to newline.(Recommended learning:Python video tutorial)

In python3, the default print() is line break, such as the picture:

What does end mean in python

This is a multiplication formula code, but in python3, the default print is a line break. In order not to break the line here, the output method needs to be changed. In fact, this is also a grammatical structure, as shown in the figure:

What does end mean in pythonThe end="\t" here means a tab character, and prints a tab character without a line break.

In addition, end="\n" is also a line break. Meaning

For more Python-related technical articles, please visit thePython Tutorialcolumn to learn!

The above is the detailed content of What does end mean in python. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:How to indent in python Next article:How to indent in python