print() function accepts an object as a parameter, such as a string, a number, or a list. It is then converted to a string through an implicit call of the built-in
str() function and the value is printed to an output stream.
The object to be printed is passed to the
print() function as a parameter:
Below is an example of the string being printed:
print("Hello, World!")# Output: Hello, World!
Multiple objects can also be printed within one
print() when passed as a comma-separated list of parameters. By default, each object is separated by one space in the printed result:
print("Hello,", "World!")# Output: Hello, World!
In additional to printing multiple objects, the
print() function also comes with
end parameters to further format the printed result:
- KabirCampwala2 total contributions