MCPcopy
hub / github.com/kyclark/tiny_python_projects / main

Function main

14_rhymer/solution1_regex.py:23–36  ·  view source on GitHub ↗

Make a jazz noise here

()

Source from the content-addressed store, hash-verified

21
22# --------------------------------------------------
23def main():
24 """Make a jazz noise here"""
25
26 args = get_args()
27 prefixes = list('bcdfghjklmnpqrstvwxyz') + (
28 'bl br ch cl cr dr fl fr gl gr pl pr sc '
29 'sh sk sl sm sn sp st sw th tr tw thw wh wr '
30 'sch scr shr sph spl spr squ str thr').split()
31
32 start, rest = stemmer(args.word)
33 if rest:
34 print('\n'.join(sorted([p + rest for p in prefixes if p != start])))
35 else:
36 print(f'Cannot rhyme "{args.word}"')
37
38
39# --------------------------------------------------

Callers 1

solution1_regex.pyFile · 0.70

Calls 2

get_argsFunction · 0.70
stemmerFunction · 0.70

Tested by

no test coverage detected