hi i have a function which returns a list and a dictionary. if functions renturns one thing i know how to use that. but how i can use returned list and dict of function?
my code is :
def links(url):
__url = str(url) # find_dl_url()
__page = requests.get(__url)
__page_content = bs4.BeautifulSoup(__page.content)
__links = __page_content.select('a[href*=".mkv"]')
__dict = {}
__sorted_dict = {}
__list = []
for links in __links:
__dict[links.string] = links.get('href')
__list.append(links.string)
__list = sorted(__list)
print(__list)
print(__dict)
return __list, __dict
if function returnes just one list i could write:
list=links(url)
but how i can get both of list and dictionary?