T
last year
Thecountry asked

How to use the print() comand?

Sudip Bhandari
Expert
last year

Hi Derek! To use the print() command in Python, you simply need to write print() followed by the content you want to display inside the parentheses.

For example, if you want to print a string, you can write:

print("Python")

This will output:

Python

If you want to print a number without quotation marks, you can do it like this:

print(5)

This will simply output:

5

So, just remember to use quotation marks for strings and none for numbers when using print()!

Hope this helps!

You will learn more about this in upcoming lessons. Let me know if you have any specific confusions.

Python
This question was asked as part of the Getting started with Python course.