LearnPy Hub
← Async Basics problems
Medium

gather Keeps Order

Same jobs as before, but each coroutine returns its name instead of printing. Print the list returned by gather: it keeps the order you passed, not the finishing order.

Input

Lines 'name delay_ms', then END.

Output

A list.

Sample 1

Input
tea 60
toast 20
egg 40
END
Output
['tea', 'toast', 'egg']

Sample 2

Input
solo 10
END
Output
['solo']
solution.py
Output appears here
gather Keeps Order · Python practice problem · LearnPy Hub