DEV Community

Discussion on: 30 Days of Python 👨‍💻 - Day 2 - Data Types I

Collapse
 
mowat27 profile image
Adrian Mowat

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.