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

Function index_file

example_code/item_043.py:89–97  ·  view source on GitHub ↗
(handle)

Source from the content-addressed store, hash-verified

87
88print("Example 6")
89def index_file(handle):
90 offset = 0
91 for line in handle:
92 if line:
93 yield offset
94 for letter in line:
95 offset += 1
96 if letter == " ":
97 yield offset
98
99
100print("Example 7")

Callers 1

item_043.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected