On Windows I can do the following without error:
a = "abc"
s = f"{a.replace("b", "x")}"
Note the nested "
characters.
On Linux, the same will throw a SyntaxError because closing )
and }
are missing in this part f"{a.replace("
.
Why is that? I would have expected a SyntaxError on Windows as well.