Save a list to a .txt file May 24, 2023 by Tarik Try this, if it helps you values = ['1', '2', '3'] with open("file.txt", "w") as output: output.write(str(values))