0

Why Quotation marks are used in python while doing a print command?. Also why don't we use them in print(2+2) why no quotes here

Basically what is significance of them. I am very new to python I need to understand it so tell in simple language

3rd Jul 2021, 4:11 AM
Sanchit Aggarwal
Sanchit Aggarwal - avatar
5 Antworten
+ 3
quotation marks are used to enclose strings, not expressions (nor numbers, nor anything else ^^)
3rd Jul 2021, 4:13 AM
visph
visph - avatar
+ 2
strings are kind of char lists: "forty-two" expressions are computations: 40+2 "forty"+"-"+"two" 22<=40 and 40<=42 usually expression contains variable names, or even function calls ^^
3rd Jul 2021, 4:21 AM
visph
visph - avatar
+ 2
you will learn more by doing the course(s) ;)
3rd Jul 2021, 4:22 AM
visph
visph - avatar
+ 1
Ok . Thanks Vish.
3rd Jul 2021, 4:25 AM
Sanchit Aggarwal
Sanchit Aggarwal - avatar
0
What are strings and also what are expression. Kindly mention them in easy language.
3rd Jul 2021, 4:15 AM
Sanchit Aggarwal
Sanchit Aggarwal - avatar