Are quotes always necessary inside a print()?


#1

Question

Within the context of this exercise which introduces the print() function, are quotes always necessary inside of the print()?

Answer

Quotes are not always necessary inside of a print() function. They are only needed when the input value of the function is a string, like "hello", which you will learn more about in exercise 4. print() functions can be used to output many other values in Python, such as:

print(10) 
print(False) 
print(["adam", "betty"]) 

FAQ: Programming with Python - Learn Python: Syntax - Print