Displaying Output

The print() function is commonly used to display output to the console. You can pass one or more arguments to the print() function.

print(“This is some text to print”)

Or you can concatenate different variables to print to the console.

print(“Name: “ + name + “, Age: “ + str(age))

Get Python Made Easy now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.