How to insert "\\\" in a string in python. It seems to give Error
SyntaxError: EOL while scanning string literal
You can use string concat option to get as many \ as you want.
If you want 3 \ then you can do:
print ('\\'*3)
If you want 8 \, then you can just do:
print ('\\'*8)
This will eliminate the need to keep typing \\\\ many times.
Here's a way to add it to a variable and use it for printing later:
>>> x = 'This is an example for '+'\\'*3+' 3 backslashes'
>>> print (x)
This is an example for \\\ 3 backslashes
print ('\\'*3)- Joe Ferndz