Skip to content

Instantly share code, notes, and snippets.

@ejamesc
Created August 8, 2020 16:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ejamesc/32570fbc99c61ab6f9f8d4946bba4420 to your computer and use it in GitHub Desktop.
Save ejamesc/32570fbc99c61ab6f9f8d4946bba4420 to your computer and use it in GitHub Desktop.
def url_all_categories(categories, sumlist)
if len(categories) == 0: # end condition
return []
else:
for cat in categories:
sub_categories = url_sub_categories(cat)
sumlist.extend(sub_categories)
url_all_categories(sub_categories, sumlist)
return sumlist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment