import asyncio
import aiohttp
import aiofiles
async def funct_1(url):
async with aiohttp.ClientSession() as session:
response = await session.get(url)
html = await response.text()
return html
async def funct_2(file, text):
async with
aiofiles.open(file,'w') as f:
await f.write(text)
async def main(urls):
tasks=[]
for url in urls:
file='Response_server.txt'
html = funct_1(url)
tasks.append(funct_2(file, html))
await asyncio.gather(*tasks)
urls=('
https://www.python.org/')
asyncio.run(main(urls))