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

Опубликовано: 19 Июнь 2021
на канале: mCoding
264,853
11k

Python has lot of useful format strings.

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/VideosS...
f-string docs: https://docs.python.org/3/reference/l...

SUPPORT ME ⭐
---------------------------------------------------
Patreon:   / mcoding  
Paypal: https://www.paypal.com/donate/?hosted...
Other donations: https://mcoding.io/donate

Top patrons and donors:
John M, Laura M, Pieter G, Vahnekie, Sigmanificient

BE ACTIVE IN MY COMMUNITY 😄
---------------------------------------------------
Discord:   / discord  
Github: https://github.com/mCodingLLC/
Reddit:   / mcoding  
Facebook:   / james.mcoding  


Смотрите видео Python f-strings can do more than you thought. f'{val=}', f'{val!r}', f'{dt:%Y-%m-%d}' онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь mCoding 19 Июнь 2021, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 264,853 раз и оно понравилось 11 тысяч людям.