Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/bslatkin/effectivepython
/ helper
Function
helper
example_code/item_033.py:52–55 ·
view source on GitHub ↗
(x)
Source
from the content-addressed store, hash-verified
50
print(
"Example 1"
)
51
def
sort_priority(values, group):
52
def
helper(x):
53
if
x in group:
54
return
(0, x)
55
return
(1, x)
56
57
values.sort(key=helper)
58
Callers
nothing calls this directly
Calls
no outgoing calls
Tested by
no test coverage detected