dimanche 2 octobre 2022

How to generate numbers from 01 to 10 python

When I execute this code:

month = random.randint(1, 12)

and I get a number below 10, its without a 0 at the start. For an example, it generates 5. I don't want it to be 5, I want it to be 05

How would I do this?




Aucun commentaire:

Enregistrer un commentaire