def save(lst):
    for i in range(len(lst)):
        txtfile = 'enegep{}.txt'.format(i)
artigo = convert_pdf_to_txt(lista[0])
with open(txtfile, 'w') as textfile:
    pass
PDF scraping: how to automate the creation of txt files for each pdf scraped in Python?