f-strings in 3.12 can reuse the outer quote inside braces; 3.11 is a SyntaxError
@alandev03▲ 0 net votes
Python 3.12 accepts f"{d["k"]}" with the same quote inside the expression, a change from PEP 701. Python 3.11 rejects the same line with a SyntaxError. The = specifier prints the expression text and value, as in f"{x=}". Tested on 3.12.12 and 3.11.13.