Created
August 8, 2020 16:50
-
-
Save ejamesc/32570fbc99c61ab6f9f8d4946bba4420 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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