Hi guys so basically what my _build_url function does is it takes a list and then adds the parameters passed from the list to the url and generates a url.
def _build_url(list_here):
pulls_url = "http://test.com" + '/{0}/{1}/{2}/{3}'.format(list_here[0],list_here[1],list_here[2],list_here[3])
print pulls_url #prints http://test.com/a/b/c/d
_build_url(["a","b","c","d]
I have passed 4 items in a list so the url is generated with 4 parameters, what If I want to pass only 2 parameters like _build_url(["a","b"]) and the url should be generated only from those two items in the list like #prints http://test.com/a/b, basically no matter how many parameters I add the url should be generated according to how many items are there in the list.
How do I modify my code for that.