Exercice de code · Cours Python · Module 6: Async et FastAPI
Première fonction async
Crée une fonction asynchrone pour observer les animaux du Safari.
Exercice
Écris une fonction async observe_animal qui attend 1 seconde (asyncio.sleep) et renvoie le nom de l'animal.