Python -Output Variables
Output Variables
Theprint() function is often used to output variables.
In theprint() function, you output multiple variables, separated by a comma:
You can also use the+ operator to output multiple variables:
Notice the space character after"Python " and"is ", without them the result would be "Pythonisawesome".
For numbers, the+ character works as a mathematical operator:
In theprint() function, when you try to combine a string and a number with the+ operator, Python will give you an error:
The best way to output multiple variables in theprint() function is to separate them with commas,which even support different data types:
Video: Python Output Variables



