I have a doubt..in the previous example..they have said that when a string is used..then double quotes are not displayed in o/p. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

I have a doubt..in the previous example..they have said that when a string is used..then double quotes are not displayed in o/p.

14th Nov 2018, 3:07 PM
shaistha tabassum
shaistha tabassum - avatar
6 Answers
+ 3
but in the next question ..quotes are displayed in the output...if both single and double quotes are used..then what is to be displayed or ignored..this is my doubt..
14th Nov 2018, 3:13 PM
shaistha tabassum
shaistha tabassum - avatar
+ 3
shaistha tabassum when you define string then you need to use " " or ' ' .e.g print("hi") #output=hi print('hi') #output=hi why output is same because you can use " " or ' 'to define a string. Ok when you use multiple "" or ' '. Then first " or ' and last one " or ' is ignore by print function because it is use to define string and other " or ' is string. e.g print("''hi''") #output=''hi'' Here first " and last one " is ignore by print function because it is use to define a string and othe ' are here string.
14th Nov 2018, 3:28 PM
Maninder $ingh
Maninder $ingh - avatar
+ 3
maninder Singh..I got it .thank you..
14th Nov 2018, 3:33 PM
shaistha tabassum
shaistha tabassum - avatar
+ 2
example of simple output..they have mentioned..if string is used in print function then double quotes are ignored in output
14th Nov 2018, 3:11 PM
shaistha tabassum
shaistha tabassum - avatar
+ 1
Which example.
14th Nov 2018, 3:10 PM
Maninder $ingh
Maninder $ingh - avatar
0
You can try it yourself in Code Playground: Write some print statements, hit RUN and see what happens!
14th Nov 2018, 3:18 PM
HonFu
HonFu - avatar