demo_ref_format.py:
x = format(0.5, '%') print(x)
➜ begtut>python demo_format.py
50.000000%