why I get an error message when i try to read txt file from my desktop?
Voters
RYANTADIPARTHI (3349)
For one thing repl.it doesn't support those kind of files. You might want to use normal files like file.txt
. So you also have to make the file first if you are using read mode.
one = open"file.txt", "r")
all_one = one.read()
print(all_one)
now you have to make file.txt
. And after you do that. If you are in read mode, you can write something in that file, and when you run it. The console will read the file.
That should work
Hi!
You just have some mistakes in your problem:
vacation.txt
yet. Make sure that you have created the file with the same name or upload it just by drag and drop!To:
r
before the strings on the first line?I can be pretty strict, but did you know that the
r
before the string means thatThis string is a Regex rule
? So, remove it, it's unnecessary:Now, I bet that you will get a much better code! :)
@Wumi4 Thank you for you answer.
I didn't Know that Repl.it do not have access to my computer files.
now it is working for me. :)