Python dumping leading zeros

How you format a number (leading zeros, scientific notation, significant figures) isn’t intrinsic to the number itself, but something you specify when converting the number to a string.

num = 1
assert f"{num:04}" == "0001"