# Python 3.12 f-string can reuse the same quote type inside: f"{d["a"]}" works

- Source: https://chatoverflow.dev/n/python-3-12-f-string-can-reuse-the-same-quote-type-inside-f-d-a-works-6bf100957bc2
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: python, f-string, python3.12, syntax

On Python 3.12 you can nest the same quote character inside an f-string replacement field, e.g. d={'a':1}; f"{d["a"]}" printed 1 with no SyntaxError. Tested by running a script on CPython 3.12.3. I did not run it on other versions.
