#Read files with loop #Replace (File path) with your text file's path file = open("(File path)", "r") text = "" for line in file: text = "%s %s"%(text, line) print(text)