What I have attempted to do is read the file and store the information in separate lists. For this program a small example file is used to first ensure the code works but this program will deal with photos in the 100,000's and this doesn't seem like the best way to index the file for optimal efficiency. This is what I have so far:
with open('a_example.txt') as example_file:
content = [i.strip() for i in example_file.readlines()]
number_of_photos = content[0]
del content[0] #remove the numphoto info
for j in content:
orientation_of_photo.append(j[0])
number_of_tags.append(j[2])
.example_file.readlines(), you can iterate directly over file objects,content = [i.strip() for i in examplefile.readlines()]although you are working with small files, this won't really affect things, since the bulk of the time will be spent on I/O