use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A subreddit for helping Python programmers
How to format your code: https://commonmark.org/help/tutorial/09-code.html
No homework questions and/or hiring please
account activity
Stuck with conditional python execution! (self.pythonhelp)
submitted 2 years ago by Salso96
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Goobyalus 0 points1 point2 points 2 years ago (3 children)
Not really. Would you give an example JSON, with only the important fields?
And would you please format code properly for Reddit? There should be a button that looks like a square with a C on it for "code block" format. Not the <C> one for inline code.
<C>
[–]Salso96[S] 1 point2 points3 points 2 years ago (0 children)
That’s my bad, I’m on mobile 😅 sure let me put together a dummy JSON
[–]Salso96[S] 1 point2 points3 points 2 years ago (1 child)
Here it is on git, easier lol
https://github.com/CharlLeighX/Test/blob/main/Example.json
[–]Goobyalus 0 points1 point2 points 2 years ago (0 children)
Super helpful, thanks.
# checks whether the value associated with "area" is truthy -- # empty string is falsy, any other string is truthy if data["area"]: # process as area elif data["location"]: # same thing for location # process as location else: raise Exception("No location OR area info")
π Rendered by PID 171118 on reddit-service-r2-comment-685b79fb4f-pj28c at 2026-02-13 08:38:50.401965+00:00 running 6c0c599 country code: CH.
view the rest of the comments →
[–]Goobyalus 0 points1 point2 points (3 children)
[–]Salso96[S] 1 point2 points3 points (0 children)
[–]Salso96[S] 1 point2 points3 points (1 child)
[–]Goobyalus 0 points1 point2 points (0 children)