More precisely, I want my format to add leading zeros to have string with constant length.
e.g. if the constant length is set to 4
1 would be converted into "0001"
12 would be converted into "0012"
165 would be converted into "0165"
I have no constraint on the behaviour when the integer is greater than what can allow the given length (9999 in my example)
How can I do that in python?