Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/dabeaz-course/python-mastery
/ run
Function
run
Solutions/8_5/multitask.py:6–13 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
4
5
tasks = deque()
6
def
run():
7
while
tasks:
8
task = tasks.popleft()
9
try
:
10
next(task)
11
tasks.append(task)
12
except
StopIteration:
13
print(
'Task done'
)
14
15
def
countdown(n):
16
while
n > 0:
Callers
1
multitask.py
File · 0.70
Calls
1
append
Method · 0.80
Tested by
no test coverage detected