Run ❯
Get your
own Python
server
×
Change Orientation
Change Theme, Dark/Light
Go to Spaces
#Use "F" to convert a number into a fixed point number, but display inf and nan as INF and NAN: x = float('inf') txt = f"The price is {x:F} dollars." print(txt) #same example, but with a lower case f: txt = f"The price is {x:f} dollars." print(txt)
The price is INF dollars.
The price is inf dollars.