The function and makes the program more interactive with the user. print() input() function Although, there are some extra things we can do with which makes the output formattable. print() Functionalities of print() function Let’s start with the syntax: print(object(s), sep=separator, end=end, file=file, flush=flush) Fact: In python, all data types are implemented as an object. : Will accepts any number of objects, which will be coverted into string before printed. We can pass it in two ways: object(s) Concatenated: Comma separated: Output: Enter any number: 2021 year:2021 : This is optional. Used to specify how to separate the objects, if there is more than one. Default is ‘ ‘ (space). sep=’separator’ Output: Enter any number: 2021 year: 2021 : This is Optional. Used to specify what to print at the end. Default is ‘\n’ (new line). end=’end’ Output: Enter any number: 2021 year: 2021 month: Jan : This is Optional. Default is sys.stdout. Used t specify the name of the file to write the output. If the file doesn’t exist, it will create a new file. file Output (in ‘Greetings.txt’ file): !!! Wish you a happy new year !!! Enjoy the year--->2021---> and the month --->January : This is Optional. A Boolean, specifying if the output is flushed (True) or buffered (False). Default is False. flush Check out this GFG article for detailed explanation of the flush parameter And, that’s it for today. Code along and have fun ;) Also published at https://dev.to/aswin2001barath/print-function-in-python-4a4h