Home > Article > Backend Development > How to enter backslash in python
Through the previous study, we have mastered how to output single quotes in Python: two solutions, one is to put the single quotes within double quotes; the other is to use escape characters, that is, \. What should I do if I want to output backslashes?
##Output backslashes in Python:
For example, to output the three characters Bob, Lucy, and Mary names, and they are separated by \, we can do this: The output result is exactly what we want! Here we also use the escape character \, and its output result is \. In this example, the first \ will escape the second \! Look at another example The result is directly output\.The above is the detailed content of How to enter backslash in python. For more information, please follow other related articles on the PHP Chinese website!