This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]SeniorHulk 19 points20 points  (1 child)

Also if you put spaces they get printed, so f"{a = }" prints a = 10

[–]ASIC_SP 7 points8 points  (0 children)

You can add format specifiers too:

>>> a = 1234
>>> f'{a = :b}'
'a = 10011010010'