I made a simple program but It shows the following error when I run it:
line1 = []
line1.append("xyz ")
line1.append("abc")
line1.append("mno")
file = open("File.txt","w")
for i in range(3):
file.write(line1[i])
file.write("
")
for line in file:
print(line)
file.close()
It shows this error message:
See Question&Answers more detail:osFile "C:/Users/Sachin Patil/fourth,py.py", line 18, in
for line in file:UnsupportedOperation: not readable