Output file in Python
for entry in response:
accession = entry['GBSeq_primary-accession']
for country in extract_countries(entry):
print("%s" % accession, "%s" % country, sep=',')
How can I write an output_file.txt with the result showed by "print"?
• 46 views
•
link
0 answers
No answers yet.
Log in to answer this question.
This is very simple and not a bioinformatics question. You could've used google to find an answer
How to redirect 'print' output to a file using python? and there are many. If you are using linux, you can also search for
redirecting stdout to a file