LearnPy Hub
← Async Basics problems
Easy

Await in a Loop

Write async def main(n) that loops i from 1 to n, awaiting asyncio.sleep(0.001) and printing step i each time. Read n and run it.

Input

One integer n ≥ 1.

Output

n lines.

Sample 1

Input
3
Output
step 1
step 2
step 3

Sample 2

Input
1
Output
step 1
solution.py
Output appears here
Await in a Loop · Python practice problem · LearnPy Hub