728x90
from datetime import datetime
user = 'eric_idle'
member_since = datetime(1975, 7, 31)
f'{user=} {member_since=}'
result -> "user='eric_idle' member_since=datetime.date(1975, 7, 31)"
python์์ f-format์ผ๋ก print ์ ํ๋ผ๋ฏธํฐ์ ํจ๊ป ์ ์ด ์ค ์ ์๋ ๋ฐฉ๋ฒ์ด Release๋์๋ค.
๋ฐ๋ค ์ฝ๋ผ๋ฆฌ (walrus operator) :=
๋ฐ์ํ
'๐ Python' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
leetCode python code markdown ๋ณํ๊ธฐ (0) | 2023.02.27 |
---|---|
python GPU memory print (0) | 2022.12.27 |
[*args, **kwargs] ํจ์ ํ๋ผ๋ฏธํฐ ๊ตฌ๋ถ์ (0) | 2022.06.13 |
[Code-Server] ์ฝ๋ ์๋ฒ์์ ์ฃผํผํฐ ๋ ธํธ๋ถ ์ฌ์ฉํ๊ธฐ (0) | 2021.07.11 |
[Code-Server] import-im6.q16: unable to open X server ์๋ฌ (0) | 2021.07.11 |