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.
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 ()
Source code:
f-string docs: #f-strings
AFFILIATES AND REFERRALS
---------------------------------------------------
Automatically Improve Python Code Quality:
SUPPORT ME ⭐
---------------------------------------------------
Sign up on Patreon to get your donor role and early access to videos!
Feeling generous but don’t have a Patreon? Donate via PayPal! (No sign up needed.)
https://ww
5 views
30
14
8 months ago 00:10:02 1
5 Useful F-String Tricks In Python
9 months ago 00:03:42 1
Non Brewed Condiment (A. Holdsworth), theme and solo by Robert “Rob Guz“ Ritchiesse
9 months ago 06:31:58 1
Python Data Analysis and Visualization Course – Astronomical Data
9 months ago 00:12:37 1
Python is HERE!
9 months ago 04:40:00 1
Python for Beginners – Full Course [Programming Tutorial]
1 year ago 00:00:39 1
95% программистов на python не знают этого.
1 year ago 00:34:15 1
Python — революция или эволюция?
1 year ago 00:15:28 1
Creation of Point Data (New Layer) using Python Program in QGIS
1 year ago 01:06:09 1
Exploring the New Features of Python | Real Python Podcast #175
1 year ago 00:02:12 1
The Beatles - Eleanor Rigby (From “Yellow Submarine“)
1 year ago 00:12:35 1
КНОПКИ ДЛЯ TELEGRAM-БОТА НА PYTHON, ЧАСТЬ 2
1 year ago 01:45:38 1
CS50P - Lecture 0 - Functions, Variables
1 year ago 00:07:32 1
What’s New In Python
1 year ago 00:19:43 2
Day 5 - String in Houdini with Python | Houdini 10 Day Introduction to Python
2 years ago 00:00:50 2
Splat Operator in Python (*, **) - Unpack Iterables