MCPcopy
hub / github.com/dabeaz/python-cookbook / sample

Function sample

src/2/combining_and_concatenating_strings/example.py:5–9  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3# Example of combining text via generators
4
5def sample():
6 yield "Is"
7 yield "Chicago"
8 yield "Not"
9 yield "Chicago?"
10
11# (a) Simple join operator
12text = ''.join(sample())

Callers 1

example.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected