The Python Oracle

How do I print curly-brace characters in a string while using .format?

Become part of the top 3% of the developers by applying to Toptal https://topt.al/25cXVn

--

Music by Eric Matyas
https://www.soundimage.org
Track title: Secret Catacombs

--

Chapters
00:00 Question
00:23 Accepted answer (Score 3086)
00:58 Answer 2 (Score 205)
01:42 Answer 3 (Score 109)
01:57 Answer 4 (Score 64)
02:51 Thank you

--

Full question
https://stackoverflow.com/questions/5466...

Accepted answer links:
[Python documentation for format string syntax]: https://docs.python.org/library/string.h...

Answer 2 links:
[f-strings]: https://docs.python.org/3/reference/lexi...
[PEP498]: https://www.python.org/dev/peps/pep-0498/

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#python #string #format #stringformatting #curlybraces

#avk47