-->

Monday, January 5, 2015

how to print percentages in python

Very simple pattern to show your percentages into a printed string
>>> print "%.0f%%" % (100.0 * 1/3)
33%

No comments:

Post a Comment