#๐ if __name__==__main__ not working
17 messages ยท Page 1 of 1 (latest)
@silent rose
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.
You need to save your learn.py file before running
bruh was that all? also how does it work tho cs when i create a file from vs code doesit not get saved?
Whenever you make any changes to a file, you need to save them manually
When you create a file it's state is already an empty file which you don't need to save, but after that any changes you make to it needs to be saved
well i didn save my files each time i changed smth until now and it has always worked? until now as until where i am in the tutorial
You can see whether your file is unsaved by this
yea i wondered what it was llol
but still why does this if name equals main gotta be saved but not all the other codes ive run on it? like ive learnt ab funcs loops lists n shi it doesn require to be saved?
You need to save your code before running any program, you must've saved them unknowingly or smt
All unsaved changes don't carry through
well wtv it works now thanks :))
The only job of saving is to write what your buffered text of data into your hard disk file. And when you run your python file it accesses it through your file saved in the hard disk
oohh alrr thanks
@silent rose Click file top right then click auto save
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.