filenames = [] for i in range(100): filenames.append((str(i) if len(str(i)) > 1 else str(0) + str(i)) + ".txt")
At the end, you will get the files file00.txt, file01.txt, ... and file99.txt in your filenames
list.
filenames_mxn = [] for i in range(m): filenames_i = [] for j in range(n): filenames_i.append(filenames[i*n + j]) filenames_mxn.append(filenames_i)
Your files are now stored in the mxn
matrix.
source share