MCPcopy
hub / github.com/learnbyexample/py_regular_expressions / num_range

Function num_range

code_snippets/Character_class.py:93–94  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

91[m[0] for m in m_iter if int(m[0]) < 350]
92
93def num_range(s):
94 return '1' if 200 <= int(s[0]) <= 650 else '0'
95
96re.sub(r'\d+', num_range, '45 349 651 593 4 204')
97

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected