ReferenceBuilt-in functions
print()
Writes values out, separated by spaces and followed by a newline.
Signature
print(*values, sep=' ', end='\n', file=sys.stdout)Parameters
| Name | Means |
|---|---|
*values | any number of things to show |
sep | put between them |
end | put at the end |
file | where to write; an open file works |
Returns
None.
Example
Python
print("a", "b")
print("a", "b", sep="-")
print("no newline", end=" -> ")
print("same line")Output
a b a-b no newline -> same line