I am a beginner in python and I am trying to parse information from eml files in python. I set up my extract function to parse what I want to get. The problem is I have 10,000+ files and I don't know how to add every extracted information to one object.
When I run the extract function on one eml file, the output looks like
{'from': 'Joe', 'to': 'Robert', 'text': 'Hey Robert'}
The output is a dict object. Now I want to append my extracted ouput to my existing output (name) to collect every information from 10,000 files in name. How can I do this? I used following code, but the name object only has the information from last file in FList (which is a list of each 10,000+ files).
for i in range(len(FList)):
f = open(FList[i])
name=extract(f, f.name)
f.close()