+ 1
What is file location in for writing in code in sololearn?
3 Answers
+ 3
At Sololearn or on the offline machine?
At Sololearn the file is created on the server either in the temporary space allocated to a user during per slot allocation or in common user space. The space is temporary and will get deleted once the program stops thus you cannot open a file created in the previous run of the program.
A new file must be created during every program execution.
On an offline machine, you know exactly where you are creating the file.
+ 3
If you're speaking of loading text files from a program, then usually, by default your program will look in the place from where it was started.
You can change that by modifying the path (check os module) or by writing the place into your open command, like:
open('c:/users/you/desktop/blabla.txt')
+ 2
In Sololearn first you have to write your own file and after that read as in your code.