I made a for loop to save files in a directory but i would like the name of the file to start with zeros
this is the code that I made
for index, i in enumerate(list):
im = PImage.fromarray(i)
im.save(dir + '/' + 'data_' + str(index) +'.tiff')
And now the file names are
data_1.tiff
data_2.tiff
and so on
But I would like them to be
data_001.tiff
data_002.tiff