Open 23bca316 opened 1 month ago
f=open("python.txt","w") line=[] while True: l=input() if l: line.append(l+"\n") else: break text="\n".join(line) f.write(text) 136 f.close() f=open("python.txt","r") file_content=f.read() f.close() reversed_content=file_content[::-1] print(reversed_content)
I hope your program is successfully run .
explain this program and solve error