It’s a FAQ.
And in response to “you really want your string to end with a backslash. There’s no way to do that in a ‘raw’ string.”: the FAQ shows how to workaround it.
>>> r'ab\c' '\\' == 'ab\\c\\'
True
>>>
More Related Contents:
- Why do backslashes appear twice?
- Saving utf-8 texts with json.dumps as UTF8, not as \u escape sequence
- “python” not recognized as a command
- Python Ctypes – loading dll throws OSError: [WinError 193] %1 is not a valid Win32 application
- How to execute Python scripts in Windows?
- Getting MAC Address
- Windows is not passing command line arguments to Python programs executed from the shell
- Python pysftp get_r from Linux works fine on Linux but not on Windows
- Which is the easiest way to simulate keyboard and mouse on Python?
- fcntl substitute on Windows
- Python Window Activation
- Python command not working in command prompt
- Using Python, how can I access a shared folder on windows network?
- Display special characters when using print statement
- python ctypes issue on different OSes
- Popen with conflicting executable/path
- Python running as Windows Service: OSError: [WinError 6] The handle is invalid
- tkinter.TclError: image “pyimage3” doesn’t exist
- How do I install SciPy on 64 bit Windows?
- pyclipper installation error: “tp_print is not a member of _typeobject”
- Get the title of a window of another program using the process name
- Microsoft Visual C++ Compiler for Python 3.4
- How to connect to a remote Windows machine to execute commands using python?
- IOError: [Errno 13] Permission denied when trying to open hidden file in “w” mode
- How do I read text from the Windows clipboard in Python?
- Adding backslashes without escaping [duplicate]
- Making Python scripts run on Windows without specifying “.py” extension
- How to change the location of the pointer in python?
- Why python executable opens new window instance when function by multiprocessing module is called on windows
- A good way to escape quotes in a database query string?