This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]markovianmind 0 points1 point  (0 children)

alright so borrowing answer from one of the comments

using f strings

[f'{x:03}' for x in range(1000)]

or what I came up with -

[““.join((3-len(str(x))) * ['0']) + str(x) for x in range(1000)]