Use zfill for strings and {var:04} when f-formatting numbers into a string
On this page of the site you can watch the video online How to pad a Python string with zeroes with a duration of hours minute second in good quality, which was uploaded by the user ModernPython 19 September 2022, share the link with friends and acquaintances, this video has already been watched 158 times on youtube and it was liked by 4 viewers. Enjoy your viewing!