[Tutor] Difference between %f and %F string formatting?
Mats Wichmann
mats at wichmann.us
Wed Apr 26 22:38:06 EDT 2017
F means print it in uppercase. That's really an edge case for a float, that would only apply to the special values infinity and not-a-number.
On April 26, 2017 8:08:16 PM MDT, boB Stepp <robertvstepp at gmail.com> wrote:
>My Google-fu must be weak tonight. I cannot find any discernible
>difference between '%f' % <some floating point number> and '%F' %
><some floating point number>. Is there any or do they duplicate
>functionality? If the latter, why are there two ways of doing the
>same thing?
>
>I had a similar question for %d and %i, but googling suggests these
>are inherited from differences in handling input in the C language,
>though I could not locate a Python example where there is a need for
>one or the other. Are there any relevant Python examples?
>
>--
>boB
>_______________________________________________
>Tutor maillist - Tutor at python.org
>To unsubscribe or change subscription options:
>https://mail.python.org/mailman/listinfo/tutor
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
More information about the Tutor
mailing list