demo_ref_format2.py:
x = format(255, 'x') print(x)
➜ begtut>python demo_format2.py
ff