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

Function sum_modulo_20

example_code/item_024.py:153–155  ·  view source on GitHub ↗
(first, second)

Source from the content-addressed store, hash-verified

151print("Sum: ", list(sum_reduce))
152
153def sum_modulo_20(first, second):
154 output = first + second
155 return output % 20
156
157modulo_reduce = itertools.accumulate(values, sum_modulo_20)
158print("Modulo:", list(modulo_reduce))

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected