1
Hello I would like to know in which cases I need to use the format method instead of f-string because with f-string it is not possible to do. For example I think it is not possible with f-string to write a formatted number:
'fps: {:.1f}'.format(55.3578) => fps: 55.3
fstring allows you to format decimal places as well as
format
. in your case would sufficef'fps: {55.3578:.1f}'
, assuming it’s in python 3.6+. As far as I know, I don’t think there’s anything you can do withformat
that you can’t do with fstring– Isac