Imprimir formato redondo Python
>>> '{number:.{digits}f}'.format(number=p, digits=n)
'3.1416'
Courageous Cobra
>>> '{number:.{digits}f}'.format(number=p, digits=n)
'3.1416'