from Bio import Entrez import xml.etree.ElementTree as ET def remove_blankets(ls): for i in range(len(ls)): if i {author} " for author in articles[doi]["Authors"]] if len(articles[doi]["Authors"]) > 0 else ["- No authors listed ",""] authorrs = '\n'.join(auths) res = f"**Title**: {articles[doi]['Title']}\n**Publication date**: {articles[doi]['PubDate']}\n
\n\tAuthors\n\n{authorrs}\n\n
\n\n**DOI**: [{doi}🔗](https://doi.org/{doi}) \n\n-----------------------\n" final_res+=res return final_res