What is the difference between print("1") and print(1) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What is the difference between print("1") and print(1)

What is the difference between print("1") and print(1)

5th Oct 2021, 8:48 AM
MONIKA BATRA
MONIKA BATRA - avatar
2 Answers
+ 7
#try this print(type("1")) print(type(1))
5th Oct 2021, 8:50 AM
Simba
Simba - avatar
+ 2
print("1") Will print 1 as a string and print(1) will print 1 as an integer.
5th Oct 2021, 9:07 AM
Aryan Yadav
Aryan Yadav - avatar