0
Can you guys explain how to do quotations with"\"
String
7 Answers
+ 2
print("\"I Love Coding\" ")
OR without using escape character \
print(' " I Love Coding" ')
Note: I put one space at the end of " and before it in second print sentence
to recognize single and double qoutes, u can delete it
+ 1
Humaira
I can't see if you have started a Python tutorial, but there is a bug in Sololearn that sometimes causes that, so I will assume you have started a course.
Python for Beginners 9.1 has tbe answer for you to review in details
"\"" will allow the qote mark to be printed using the escape character
+ 1
Used for ignore any character after it and that character will be printed as it was written
+ 1
Thank you guys so much I think I got a better understanding of it!!
0
Can you explain the main purpose of the escape character?
0
In strings some characters have special functions in many languages. For example "", which actually denotes the outside of a string. So normally you can't place a " in strings because it would cut off the string at that point. So we use the escape character \ to have that character escape it's standard string function and form part of the string itself. Hope that helps.
0
In strings some characters have special functions in many languages. For example "", which actually denotes the outside of a string. So normally you can't place a " in strings because it would cut off the string at that point. So we use the escape character \ to have that character escape it's standard string function and form part of the string itself. Hope that helps.