print()
function is used to find the prints the given object to the standard output device (screen) or to the text stream file in Python for the given input.
print()
function is a part of Python Built-in Functions.
Syntax of print()
Function
The syntax of
print()
function in Python is:
print(*objects, sep=' ', end='\n', file=sys.stdout, flush=False)
Parameters of print()
Function in Python
x
– Where x
is any valid . This parameter is required.
Compatibility
print()
function is available and compatible with both Python 2.x
and 3.x
.
Return Value of print()
Function in Python
print()
function returns prints the given object to the standard output device (screen) or to the text stream file for the given input.
Python print()
Function Example 1
Example CODE
Output:
Python print()
Function Example 2
Example CODE
Output: