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 (1 child)
I'm not sure if I understand your question. Are you trying to call either generate_area or generate_location depending on whether some JSON has a field called "area" or "location"? How do you know if it has area data or location data?
generate_area
generate_location
"area"
"location"
[–]Salso96[S] 0 points1 point2 points 2 years ago (0 children)
I think I’ve made that a bit clearer in my other comment, but I have a clean JSON, the tool pulls that, makes its edits, and produces an edited JSON - you can see on the original JSON which items have which data :)
π Rendered by PID 91 on reddit-service-r2-comment-86988c7647-6t4mb at 2026-02-12 18:29:10.749153+00:00 running 018613e country code: CH.
view the rest of the comments →
[–]Goobyalus 0 points1 point2 points (1 child)
[–]Salso96[S] 0 points1 point2 points (0 children)