Force amount of digits

say I am running this program:

for i in range(0, 10000):

and I want to force four digits, so that I get 0000 on the first print instead of just 0.
how will I do that? is there a shortcut method?

Force suggests resistance or there being something you can set
If you have a string that isn’t as long as you’d like, you could prepend zero’s, for which you could use concatenation or string methods or string formatting

isn’t there a built in python method for doing this?
I know there is one in C so I thought there will be one in python too.

I mentioned a few. Take a look at what methods a string has, for example.

If you have some value type and there’s something you think that hey, it probably does that, then, you’d probably wanna check out its different methods and see if one of them looks like a match.

If you’re thinking of the approach of doing this in C which I’m thinking of, you could search for that and Python and find a simple way of doing what you’re after…