Problem with list and file

Hello, this is my problem.
I have a list with items(text).
List has variable length.
I need to save in a file(txt, doc, pdf) the item that are inside the list.
i can’t use google doc or google sheet.

What can i do?
thank you in advance.