0

How I Can Read & Write Files On Dcoder (An Android)

I Just Can't Open The File -Code: file = open('/storage/emulated/0/ninei/test4maiko.txt',"r") ↓ File "source_file.py", line 1 file = open('/storage/emulated/0/Dcoder/test4maiko.txt',"r"") ^ SyntaxError: EOL while scanning string literal Process finished with exit code 1.

19th Dec 2020, 11:29 AM
Maiko _13
Maiko _13 - avatar
2 ответов
+ 3
Look closely, you have written "r"" there is an extra double quote (") Also, I am not sure but I don't think Dcoder will be able to open files stored on your phone, because just SoloLearn, Dcoder executes the code on a remote server and not on your phone.
19th Dec 2020, 12:19 PM
XXX
XXX - avatar
0
you can do it in pydroid though. here's some code that uses a file to save info and then reads from it https://code.sololearn.com/c1v5i6BVFWuQ/?ref=app
19th Dec 2020, 3:02 PM
Slick
Slick - avatar