With PyF: ``` ghci> x = 1.0 :: Double ghci> [fmt|{x}|] "1.0" ghci> [fmt|{x:g}|] "1.000000" ``` In Python ``` >>> f"{1.0:g}" '1' ``` That's convenient because it allows the user to trim the trailing `0` and `.` if any.