What is file location in for writing in code in sololearn? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What is file location in for writing in code in sololearn?

https://code.sololearn.com/c2EY55oD9XPK/?ref=app

1st Sep 2022, 3:17 PM
|| H A C K E R Z 2 0 2 1 ||
|| H A C K E R Z 2 0 2 1 || - avatar
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.
1st Sep 2022, 3:19 PM
freaky
freaky - avatar
+ 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')
1st Sep 2022, 3:20 PM
freaky
freaky - avatar
+ 2
In Sololearn first you have to write your own file and after that read as in your code.
1st Sep 2022, 4:33 PM
JaScript
JaScript - avatar