I'm working on a function that reads multiple files (from their filenames in a single file) one-by-one. I set up the means of getting the amount of filenames in the file, but I'm not sure what I should use in the loop sequence. Here is where I am at now:
with open('userdata/addedfiles', 'r') as read_files:
number_of_files = sum(1 for _ in read_files)
print(number_of_files, "files added")
print("File contents: \n")
# get individual filenames in file and
# read them one by one
for x in range(number_of_files):
# hmm...
Any suggestions on what to use here? Thanks.