+ 1
Why didn't the above one works ???
I need some help with the function keyword in phyton. I typed two codes, but one worked and one didn't, even though they are both strings. Can somebody help me with it. https://code.sololearn.com/c02tRdev3PdO/?ref=app
4 ответов
+ 3
Xeltion this is because \ is an escape character. Basically it ignores any character that follows it or changes its meaning to a normal string.
for example
normally
print(“””) wouldnt work and give you and eof error, but print(“\””) does work because it ignores the meaning of the middle “
it is in the Python course btw.
+ 1
Thanks, but why does only a single ' \' didn't work ?