Skip to content
Advertisement

format numbers or string to currencies in python

I run into the following error when attempting to format string in python,

JavaScript

Advertisement

Answer

when you write:

JavaScript

then mv becomes a tuple.

Try without the comma…

Also, I find the f-string syntax clearer. You may want to take advantage of it if you are using Python >=3.6:

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement