The print function shows information to the user of our program. This can be useful to show the user what the program is doing when we execute it. We run the print function by specifying the function name (print) and adding parentheses after it. Here is an example:
This tells Python to execute the function. We don’t see anything on our screen, but this produces an invisible newline character, which shows up as a blank line on your screen. This is the equivalent of hitting Enter in a text editor.
If we want to see something on our screen, we have to tell the print function what to print between the parentheses and encapsulated with quotes. For example:
When you execute this code, it shows us “Hello World”.