Reupload (purge)

This commit is contained in:
gauvainboiche
2026-08-04 16:42:35 +02:00
commit bb74ba5173
1023 changed files with 79600 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
"""
async for
async with
"""
import asyncio, aiohttp
async def check(url):
async with aiohttp.ClientSession() as session:
async with session.get(url) as response:
print(f"{url} : status => {response.status}")
async def puissance2(stop= 10):
exponent = 0
while exponent < stop:
yield 2 ** exponent
exponent += 1
await asyncio.sleep(0.2)
async def main():
liste = []
async for i in puissance2():
liste.append(i)
print(liste)
liste = [j async for j in puissance2()]