Hmmm maybe like this?
#! /usr/bin/python3 def recursive_urls(links): if len(links) > 0: # remove first element of list: current = links.pop(0) # instead of the print statement, # make your request/do business: print(current +'\n') # recursively call the method again # and pass remaining links: recursive_urls(links) if __name__ == '__main__': urls = [ 'http://test1.com', 'https://test2.com', 'https://test3.com', 'https://test4.com' ] recursive_urls(urls)EDIT: My apologies I thought you were trying to use the recursion method... not avoid it :)