Lowest price ever! Learn Generative AI for 48% less!
Get my discount0
Text editor during Python tutorial
How do i access a text editor and then create the file, and then open file and add to it, then rename and open a files.py file and add the path and all that. I am very new to all of this and am stuck on the exercise of 6 methods or reading file task. I dont know how to operate the text editor so i can create a file add to that file and set a path.
2 Answers
+ 1
BG ,
The text editor on Sololearn is the Code Playground, accessible via Create > Code > New (icon like a plus sign + in a circle).
File access is somewhat limited here. Sololearn runs your program in a virtual environment that resets every run. You are limited to the folder structure in that environment.
Some Sololearn example files are always there. You can have your program open one of them, or it can open a new file, write to it, and read from it while your program runs, but the file will be lost when your program ends.
I think the folder structure has changed sometime in the last few months. I haven't tried it lately, but somebody else will probably describe it.
+ 1
BG ,
from what you are describing, i would recommend you to use a local coding ide on your device. this enables you to work with files, paths, directories.
if you are on android, you can try `pydroid`. the basic verion is free, but advertising is annoying. so it needs to buy the lifetime ad--free version. you can get more info by visiting the playstore.
for ios systems, you may go for `pythonista`. i used this years ago, but i am not sure if it is still available with an up-to-date python version.
to create txt files as input files for your program, you can use simple text editors, which can save the content in pure text format.