0

Attempting to add a string

I am attempting to add a string into pycharm. The Word is Don’t The string is For = Don’t Pycharm keeps telling me: Unsolved reference ‘Don’ End of statement expected. Any help?

11th Dec 2020, 12:42 PM
roy romano
roy romano - avatar
3 Answers
+ 9
I can't understand your question clearly but I think I know what you're referring too Use backslash to escape quotation marks inside the string For = 'Don\'t' or For = "Don't"
11th Dec 2020, 12:46 PM
noteve
noteve - avatar
+ 3
LoL, Oh my god. i didnt add the quotes even... lol, im dumb. thank you!
11th Dec 2020, 12:47 PM
roy romano
roy romano - avatar
+ 2
roy romano There are types you can use string ' , '' ,"' Like if you get Don't type word Use Double quote or if you need double quote in sentence use triple quote
12th Dec 2020, 10:47 AM
Sayyam Jain
Sayyam Jain - avatar