MCPcopy Create free account
hub / github.com/bslatkin/effectivepython / insert_value

Function insert_value

example_code/item_092.py:59–64  ·  view source on GitHub ↗
(array, value)

Source from the content-addressed store, hash-verified

57
58print("Example 2")
59def insert_value(array, value):
60 for i, existing in enumerate(array):
61 if existing > value:
62 array.insert(i, value)
63 return
64 array.append(value)
65
66
67print("Example 3")

Callers 1

insertion_sortFunction · 0.85

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected