Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/bslatkin/effectivepython
/ repeated_is_heads
Function
repeated_is_heads
example_code/item_023.py:99–101 ·
view source on GitHub ↗
(count)
Source
from the content-addressed store, hash-verified
97
98
print(
"Example 7"
)
99
def
repeated_is_heads(count):
100
for
_ in range(count):
101
yield
flip_is_heads()
# Generator
102
103
all_heads = all(repeated_is_heads(20))
104
assert not all_heads
Callers
1
item_023.py
File · 0.85
Calls
1
flip_is_heads
Function · 0.85
Tested by
no test coverage detected