I'm working on cs50's web track Finance Project, and in their helpers.py
file they have the following function:
def usd(value):
"""Format value as USD."""
return f"${value:,.2f}"
I believe that it takes a value and transforms into USD format. But in my html (using flask), I'm supposed to use it like this:
{{ quote["price"] | usd }}
Also, what does the |
do to quote["price"]
.
Hopefully you can help me, thanks! :)