[Chennaipy] Format String (was Re: (no subject))

Vijay Kumar vijaykumar at bravegnu.org
Thu Sep 21 00:38:49 EDT 2017


On Wed, September 20, 2017 9:55 pm, anitha ganesan wrote:
> Hello,
>
>
> I am Anitha Ganesan, I am beginner to python and i have a doubt.
>
>
> What is the function of* %5.1f *and* %7.2f *in the below line.
>
>
> print "%5.1 f %7.2f" %(fahrenheit,celsius)

Hi Anitha,
Try reading https://pyformat.info/#number

Regards,
Vijay


More information about the Chennaipy mailing list