Mega Code Archive
Categories
/
Python Tutorial
/
String
Signs, Alignment, and Zero-Padding
A zero means that the number will be zero-padded: from math import pi print '%010.2f' % pi