Entering edit mode
7.2 years ago
Lilizine
▴
10
Hi all I want to write the output for each tuple ( year, term) in an xml format This is what I have done:
enteryears = range(2017, 2016, -1)
termList=["unmet ","needs"]
for year in years:
for query in termList:
xml_data=fetchByQuery(query,years)
if xml_data==None:
print 80*"*"+"\n"
print "This search returned no Pubmed Data"
else:
with open(query+str(year)+'.txt',"w") as temp_file:
temp_file.write(xml_data(query,years))
temp_file.close()
The issues: - The way I am writing the code it returns files with the query names without years and with the same content !
Thanks in advance