Answer the question
In order to leave comments, you need to log in
Python 3.5 interpreter, how to work with files?
Welcome all. A small preface - once upon a time I studied python on ubuntu and, in fact, abandoned this matter. Now, due to some circumstances, it was necessary to bring my skills at least to the basic ones. On Ubuntu, the situation was simple: create a file -> write the required code -> save -> run. Profit. At the moment I hang on Win8 and put the PYTHON 3.5 interpreter And, I'm sorry, I broke my brain. I open the interpreter, I try to create a file in order to open it and start writing in it (Maybe the interpreter is not intended for this at all? O_o), but no matter what I do, it doesn’t work for me. Of course, you can work with Visual Studio, but I'm used to not retreating in such things.F = open('text.txt', 'w')
I tried to create a file and open it for editing with this request. It didn't work out. Tostorians, tell me, please. And don't scold me, please =)
Answer the question
In order to leave comments, you need to log in
You have clearly written that you do not have write permissions to the specified file. Judging by the screenshot, you are typing text in the interpreter, from which directory are you calling it?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question