[Version] 3.12 rc (Release Candidates) (1) - f-string
ยท
๐Ÿ Python
Python 3.11 -> 3.12 ๋ณ€ํ™” 1. Nested quote character f-string ์‚ฌ์šฉ์‹œ ์ž‘์€ ๋”ฐ์˜ดํ‘œ(')๋กœ dictionary์˜ item์— ์ ‘๊ทผ์ด ๊ฐ€๋Šฅํ•˜์ง€๋งŒ ํฐ ๋”ฐ์˜ดํ‘œ(")๋กœ๋Š” Error๊ฐ€ ๋‚œ๋‹ค. [3.11] fruit = { "name" : "apple", "price" : 3000 } f"{fruit['name']}" # apple f"{fruit["name"]}" # Syntax Error [3.12] fruit = { "name" : "apple", "price" : 3000 } f"{fruit['name']}" # apple f"{fruit["name"]}" # apple 2. f-string ์•ˆ์— ์ฃผ์„ ์‚ฌ์šฉ [3.11] fruit = { "name" : "apple", ..
๋‹คํ–ˆ๋‹ค