+ 7
Where to write a \ into a string to separate double quotes enclosed number from string (ââ) ???
I need to output by using \ print(âA number enclosed in double quotes: 42â) After having tried a whole hour I wrote my own code with same output ... but itâs not accepted .... Can somebody help me please
5 Answers
+ 8
Thx very much but I found it from myself...!!
print(âA number enclosed in a double string: â42ââ)
Just needed to change strings double quotes in single quotes đ
+ 3
lol I forgot that ;)
+ 2
Try this:
print(' A number enclosed in double quotes : \"42\" ')
+ 2
Keeping some knowledge about escape sequences is handy btw, for example you would be able to handle situations where you might need both " and ' quotes in one string and it is applicable throughout most languages
+ 1
"Here a enclosed thing : \"42\""