DEV Community

Discussion on: Python: What is an f-string?

Collapse
 
muhimen123 profile image
Muhimen

f-string? Better way to use .format()

Keep in mind, f-string is only available for python 3.6 and upper

Collapse
 
adrianmarkperea profile image
Adrian Perea

I find the syntax of format a little bit harder to read than f-strings. F-strings make strings with variables read like prose

Collapse
 
adamlombard profile image
Adam Lombard

Thank you for noting the Python version. Excellent point!

Collapse
 
syntax753 profile image
Peter Turner • Edited

Shouldn't you edit the article to mention the version?
Good article in any case :)

Thread Thread
 
adamlombard profile image
Adam Lombard

Yes, thanks for the suggestion. :)