0

string for double quote

how do you create a string for double quote in python

18th Jul 2019, 11:27 PM
Margaret Kiama
2 ответов
+ 2
Do you mean, how do you use a double quote in a string? a = "\"This\" is how you escape characters" You use the backslash to "escape" the next character which would otherwise have a special meaning
18th Jul 2019, 11:56 PM
Austin
+ 1
You can also use double quotes within a string wrapped by single quotes, or use single quotes within a string if wrapped by double quotes-without using an escape character: print(" 'hello' ") print(' "hello" ')
19th Jul 2019, 12:59 AM
Jake
Jake - avatar