0
string
how to create a string containing a double quote
4 odpowiedzi
+ 12
a=""" "thing" """
#three quotes make it so anything inside it is a string
print(a)
a=' "idk" '
#you can use ' in place of " for the container
print(a)
a=" \"lol\" "
#you can use \ behind " to include it in the string
print(a)
https://code.sololearn.com/crMwXSnEy5e2/?ref=app
+ 3
by using backslash followed by "
0
Use single quotes as the outer quotes or escape the double quote.
'you can use a "double" like this'
"Or with outer double \" quotes like this"
0
What @Ahri Fox did there with the 3 qoutes is known as a python string literal FYI. 😉