0
why is the answer \"? that's where I'm lost! thanks
3 Respuestas
+ 4
'\' is escape sequence. It would skip the value next to '\'
for example:
print('how're you?)
will throw error, because python thinks the string ends with 'how' and it just omit, 're you?' because of single quote.
we can use \ to tackle, this situation.
print('how\'re you?')
now python would see the escape sequence and eliminate the character from executing so that it will print the entire sentence with single quote
Shortly '\' is escape sequence, which omits character next to it.
0
I understand now. thank you so much
0
:-) cheers