#๐ very simple thing
32 messages ยท Page 1 of 1 (latest)
@chilly widget
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
Have you looked in C:/Users/zinif?
See the CMD prompt. That shows your "working directory", what we think of as "where your programme runs".
If you open a file with a relative pathname like "swew.txt" that is where the realtive pathname starts from.
Youu can, if you wish, issue cd command at the CMD prompt to change the working directory. To where you want your programme to do its work.
please.
i wanna change into my folder
If you mean the folder with your code, try typing:
cd Downloads/Python
yaa i did itt
Observe the change in the prompt.
๐ THANKSS
One more thing.
hmm?
The common convention for opening a file is like this:
with open("swew.txt", "w", encoding="utf-8") as f:
f.write("some text")
The with will close the file automatically for you, even if something goes wrong.
Note the stuff using f is indented to be "inside" the with
ok
This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.