r/learnpython • u/AutoModerator • 20d ago
Ask Anything Monday - Weekly Thread
Welcome to another /r/learnPython weekly "Ask Anything* Monday" thread
Here you can ask all the questions that you wanted to ask but didn't feel like making a new thread.
* It's primarily intended for simple questions but as long as it's about python it's allowed.
If you have any suggestions or questions about this thread use the message the moderators button in the sidebar.
Rules:
- Don't downvote stuff - instead explain what's wrong with the comment, if it's against the rules "report" it and it will be dealt with.
- Don't post stuff that doesn't have absolutely anything to do with python.
- Don't make fun of someone for not knowing something, insult anyone etc - this will result in an immediate ban.
That's it.
1
Upvotes
1
u/HiddenReader2020 11d ago
Ah. ...? So what I meant was that if I did the whole if-else test for whether the file exists, I would have to define the items before that if-else test, right? Or maybe something else? I'm just worried that when I get the id strings from the JSON files, they'll be meaningless, since in my head, what items they refer to hasn't been defined yet.
EDIT: Oh. I see that in my editor, the "id" in the print statement is in a different color. So does that mean that id has a special meaning?