four digit representation python

f"{MyNumber:0=3d}"

Here is what the above code is Doing:
1. The f-string is telling Python to format the string.
2. The colon (:) is telling Python where to start formatting.
3. The 0= is telling Python to use leading zeros instead of spaces to pad the number.
4. The 3 is telling Python how many digits to use.
5. The d is telling Python to use a decimal format.