F-strings In Python: Everything You Need To Know

Python’s F-strings are incredibly powerful. Knowing how to use them and taking advantage of their formatting options can significantly improve your ability to write logging messages and display information in an understandable manner. In this video, I’ll take a deep dive into F-strings and demonstrate some of their uses. ➡️ Pendulum package: 👷 Join the FREE Code Diagnosis Workshop to help you review code more effectively using my 3-Factor Diagnosis Framework: 🛒 GEAR & RECOMMENDED BOOKS: 🎓 Sign up to Brilliant now and get 20% off the annual subscription: 👍 If you enjoyed this content, give this video a like. If you want to watch more of my upcoming videos, consider subscribing to my channel! 💬 Discord: 🐦Twitter: 🌍LinkedIn: 🕵Facebook: 📱Instagram: 👀 Code reviewers: - Yoriz - Ryan Laursen - James Dooley - Dale Hagglund 🎥 Video edited by Mark Bacskai: 🔖 Chapters: 0:00 Intro 1:07 What are F-strings? 1:26 Formatting numbers 5:27 Padding and alignment 8:58 (Data)classes, Str and Repr 13:01 Date and time formatting 16:11 Dealing with special characters 19:01 Printing variables for debugging purposes 20:09 Multiline strings & comments 21:20 F-strings performance 22:34 Advantages of Python f-strings #arjancodes #softwaredesign #python DISCLAIMER - The links in this description might be affiliate links. If you purchase a product or service through one of those links, I may receive a small commission. There is no additional charge to you. Thanks for supporting my channel so I can continue to provide you with free content each week!
Back to Top