The end parameter in the print function is used to add any string. At the end of the output of the print statement in python.
By default, the print function ends with a newline.
Passing the whitespace to the end parameter (end=‘ ‘) indicates that the end character has to be identified by whitespace and not a newline.
For example:
print(“Toppr”, end=’ ‘)
print(“is awesome”)
Output:
Toppr is awesome
For example:
print(“toppr”, end=’ says ‘)
print(“you are awesome”)
Output:
toppr says you are awesome
Related Questions
- How do you find the Area of a Triangle in Python?
- What is Pascal Triangle in Python?
- How do you make a Triangle in Python?
Related Topics
- Python Lambda (Anonymous) Function
- Python *args and **kwargs (With Examples)
- Python Array of Numeric Values
- Python Assert Statement
- Python Comments (With Examples)
- Python del Statement (With Examples)
- Python Dictionary Comprehension
- Python Functions (def): Definition with Examples
- Python Function Arguments (Default, Keyword and Arbitrary)
- Python Global Keyword (With Examples)
- Python Global, Local and Nonlocal variables (With Examples)
- Python ascii()
- Python delattr()
- Python super()
- Python locals()
- Python hash()
- Python id()
- Python sorted()
- Python dict()
- Python callable()
- Python dir()
- Python next()
- Python divmod()
- Python float()
- Python bytearray()
- Python filter()
- Python issubclass()
- Python __import__()
- Python enumerate()
- Python list()
- Python input()
- Python int()
- Python complex()
- Python zip()
- Python iter()
- Python bool()
- Python hex()
- Python open()
- Python ord()
- Python Built-in Functions
- Python oct()
- Python compile()
- Python reversed()
- Python tuple()
- Python frozenset()
- Python map()
- Python setattr()
- Python len()
- Python chr()
- Python object()
- Python bytes()
- Python getattr()
- Python slice()
- Python str()
- Python sum()
- Python isinstance()
- Python bin()
- Python type()
- Python range()
- Python Dictionary items()
- Python List sort()
- Python List reverse()
- Python String strip()
- Python String join()
- Python String split()
- Python User-defined Functions
Leave a Reply