How to fix the string with escaping characters


#1

Escaping characters

'This isn't flying, this is falling with style!'


#2

Hi @srajamma just set a slash invert punctuation before the apostrophe, like this:

print 'This isn\'t flying, this is falling with style!'


#3

Good morning;

Having the problem where I have entered this :

'This isn\'t flying, this is falling with style!'

and I get ;
File "python", line 3
'This isn't flying, this is falling with style!'
^
SyntaxError: invalid syntax

it is the exact same as the example, but it is not accepted.
What am I missing?


#4

I had the same problem. Its simple delete line 3 if you wrote the code on line two instead of editing line 3. like I did.


#5

Read the question properly! all you need to do is fix the error!so just add the backslash and it is solved:)


#7