url_list = ['www.scrape.com/file1', 'www.scrape.com/file2', ''www.scrape.com/file3']
category_id_list = ['12345','abcde','ABCDE']
zip_list = ['10075','10017','10028']
I have three variables I use to create a URL to be requested. in the order: url_list+zip+categoryid
the url is then passed into a function which has the scrape code
I was using 3 for loops to iterate over these lists but that is highly redundant
for url_ in url_list:
for category_id in category_id_list:
for zip_ in zip_list:
request_url = url_+category_zip_
func(request_url)
This does the job, but is there a more optimal way to do it? Thank you!