I'm trying to escape backticks in Python. For an example, I have this string.
>>> s = "my ` string"
>>> s
'my ` string'
Doing re.sub("`", "\`", s) will return 'my \\` string'.
How do I escape the backtick such that it will yield my \` string?
I need this because I will supply that string as an argument for a shell command, running inside a Jupyter Notebook.
! ./script.sh "$s"