Yeah me too. f'{}...' usually meets my needs and I only use format when I need to use printf style formatting or the expression I want to print is complex enough to impact readability inside a simple interpolation.
I believe the %-format approach is from python2 and str.format() is preferred in python3. You still see it a lot though.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
After reading some articles and blog posts I found out that:
I am still figuring out the best practices but I personally like the
f
syntax.And yes learning python is a real joy. Hope I keep getting better at it :) Thanks for reading the blog.
Yeah me too. f'{}...' usually meets my needs and I only use format when I need to use printf style formatting or the expression I want to print is complex enough to impact readability inside a simple interpolation.
I believe the %-format approach is from python2 and str.format() is preferred in python3. You still see it a lot though.