Python f-strings can do more than you thought. f'{val=}', f'{val!r}', f'{dt:%Y-%m-%d}'

Python f-strings can do more than you thought. f'{val=}', f'{val!r}', f'{dt:%Y-%m-%d}'
f-strings in Python are not just a way to easily substitute variables inside strings, they come with a wide array of conversion, formatting, and debugging options which we give examples of in this video.

f-strings in Python are not just a way to easily substitute variables inside strings, they come with a wide array of conversion, formatting, and debugging options which we give examples of in this video.

Note: I’m trying a more informal style in this video so make sure to let me know if you like it better this way, as opposed to my usual cut-after-every-sentence editing.

― mCoding with James Murphy (https://mcoding.io)

Source code: https://github.com/mCodingLLC/VideosSampleCode
f-string docs: https://docs.python.org/3/reference/lexical_analysis.html#f-strings

Suggest:

Learn Python in 12 Hours | Python Tutorial For Beginners

Complete Python Tutorial for Beginners (2019)

Python Tutorials for Beginners - Learn Python Online

Python Programming Tutorial | Full Python Course for Beginners 2019

Python Tutorial for Beginners [Full Course] 2019

Learn Python 3 Fundamentals From Scratch