I want to make a little program that reads a txt file and generates a list of lines of that file. The code that I have is the following:
f = open("rutas de archivos.txt","w",encoding="utf8")
linesfilelist = f.readlines()
f.close()
When executing this program I get the following error message:
Traceback (most recent call last):
File "C:\...", line 2, in <module>
linesfilelist = f.readlines()
io.UnsupportedOperation: not readable
What does it mean?