import osa = []with open("pp.txt","r+",encoding="utf8") as file: for line in file.readlines(): a.append(line.strip("\n"))print(a)b = ""for item in a: b+= item+" "print(b)