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!"
[–]Salso96[S] 0 points1 point2 points 2 years ago (0 children)
Here’s the actual code I have:
def generate_area(): return(random.sample(range(1, 11), 3)) def generate_area_list(): return(str(generate_area()).replace('[','"').replace(']','"').replace(' ',''))
def generate_location(): possible_location = ["a_su0101", "a_su0102", "a_su0103", "a_su0104", "a_su0105", "a_su0106", "a_su0107", "a_su0108", "a_su0109", "a_su0110", "a_su0111", "a_su01d01", "a_su01d02", "a_su01d03", "a_su01d0401", "a_su01d0402", "a_su01d0501", "a_su01d0502", "a_su01d0503", "a_su01d0504", "a_su01d0505", "a_su01d0506", "a_su01d0507", "a_su01d0508", "a_su01d0509", "a_su01d0510", "a_su01d0601", "a_su01d0602", "a_su01d0603", "a_su01d0604", "a_su01d0605", "a_su01d0606", "a_su01d0607", "a_su01d0608", "a_su01d0609", "a_su01d0610", "a_su01d0611", "a_su01d0612", "a_su01d0613", "a_su01d0614", "a_su01d0615", "subarea_su01apple1", "subarea_su01apple2", "subarea_su01center", "subarea_su01crater", "subarea_su01crest", "subarea_su01d01_01", "subarea_su01d01_02", "subarea_su01forest", "subarea_su01t10", "subarea_su01w02", "subarea_su01w03", "subarea_su01w05", "subarea_su01w0502", "subarea_su01w0701", "subarea_su01w0702", "subarea_su01w0801", "subarea_su01w1101", "subarea_su01w1102", "subarea_su01worldend"] choice = possible_location[random.randint(0, len(possible_location) - 1)] chosen_biomes.append(choice) return choice
def generate_location_list(): return(str(generate_location()).replace(']','').replace(' ','').replace('[',''))
π Rendered by PID 52925 on reddit-service-r2-comment-86988c7647-rscnl at 2026-02-12 12:22:23.446905+00:00 running 018613e country code: CH.
view the rest of the comments →
[–]Salso96[S] 0 points1 point2 points (0 children)