Nuthakki Keerthi sree
last year
Nuthakkicountry asked

In Python, do we need to use double quotes to print numbers?

Sarthak Baral
Expert
last year
Sarthak Baral answered

Hi Nuthakki,

No. To print a number, do not use quotes:

print(5)
print(10.5)

Quotes are only for text. If you write "5", Python treats it as a string, not a number.

If you have more questions, I am here to help 😊

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