0
Quotes
What happens when we have a string with enclosed in "somw text "num" "; with double quotes in it when we run the program?
6 Antworten
+ 3
SyntaxError
+ 3
Or do it like this
'Some text "num" '
+ 1
If you want to place double quotes into the string you need to place '\' before it like:
"some text \"num\" "
Otherwise, as Simba said you will get a Syntax error.
0
Simba thanks!! Wait uhm is there like a practical explanation to your answer given?
0
Aleksei Radchenkov makes sense. Thanks!!
0
Or if you are in python you could do:
r""" some text " hhhd ' """
Then you could use both types of quotes 😉