Not sure why you think python can’t do this. I do it all the time.
Backticks were an alias of `repr` in Python 2.x:
$ python2.7
Python 2.7.6 (default, Nov 13 2018, 12:45:42)
[GCC 4.8.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> foo="this is foo"
>>> `foo`
"'this is foo'"
And it went away in 3: $ python3
Python 3.11.3 (main, Apr 5 2023, 15:52:25) [GCC 12.2.1 20230201] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> `ls`
File "<stdin>", line 1
`ls`
^
SyntaxError: invalid syntax