2020 MEOPAR ATM session "Python: f-strings and Q&A" on 2020-10-19
- Explain what a Python f-string is
- Write f-strings
- Use f-strings as an aid to debug Python code
- Format variable values in f-strings
- Use f-strings to compose structured file paths/names
-
Slides notebook from the session. This notebook uses the Rise notebook extension to be both a notebook and a slide-deck.
-
This is the live-coding notebook from the session with a few post-session annotations.
-
A good article about f-strings on realpython.com: https://realpython.com/python-f-strings/
-
Mariatta Wijaya's PyCon Canada 2017 closing keynote about f-strings and how they made their way into the language: https://www.youtube.com/watch?v=kGd1TVfP_Ds
-
Format Specification Mini-Language for controlling how variables in f-strings are formatted: https://docs.python.org/3.8/library/string.html#formatspec
-
Date/time formatting directives for controlling how date.time objects in f-strings are formatted: https://docs.python.org/3/library/time.html#time.strftime
-
2020 MEOPAR ATM Whova "Python Discussion" forum: https://whova.com/portal/webapp/meopa_202009/CommunityBoard/topic/452273/