Is it possible to associate certain iterables in a loop with certain items from a list ?
I have two lists to start with (totalpages
and arguments
) and I need to build up certain URL's.
totalpages = [300, 0]
arguments = ['argument1', 'argument2']
urllst = []
for i in totalpages:
pages = list(range(0, x+100, 100))
print(pages)
for page, argument in zip(pages, arguments):
urls = 'http://URL'+str(page)+argument
urllst.append(urls)
urllst
I would like urllst
to be like :
[
'http://URL0argument1',
'http://URL100argument1',
'http://URL200argument1',
'http://URL300argument1',
'http://URL0argument2'
]