xxxxxxxxxx
>>> from decimal import *
>>> getcontext().prec = 6
>>> Decimal(1) / Decimal(7)
Decimal('0.142857')
>>> getcontext().prec = 28
>>> Decimal(1) / Decimal(7)
Decimal('0.1428571428571428571428571429')
xxxxxxxxxx
if __name__ =="__main__":
print(f'{5:05}') # 00005
print(f'{5:.05f}') #5.00000
print(f'{5:0<5}') #50000
print(f'{5:0>5}') #00005
print(f'{5:0^5}') #00500