Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/bslatkin/effectivepython
/ populate_ranks
Function
populate_ranks
example_code/item_025.py:93–97 ·
view source on GitHub ↗
(votes, ranks)
Source
from the content-addressed store, hash-verified
91
92
print(
"Example 10"
)
93
def
populate_ranks(votes, ranks):
94
names = list(votes.keys())
95
names.sort(key=votes.get, reverse=True)
96
for
i, name in enumerate(names, 1):
97
ranks[name] = i
98
99
100
print(
"Example 11"
)
Callers
1
item_025.py
File · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected