MCPcopy Create free account
hub / github.com/TheAlgorithms/Python / md_prefix

Function md_prefix

scripts/build_directory_md.py:21–34  ·  view source on GitHub ↗

Markdown prefix based on indent for bullet points >>> md_prefix(0) '\\n##' >>> md_prefix(1) ' *' >>> md_prefix(2) ' *' >>> md_prefix(3) ' *'

(indent: int)

Source from the content-addressed store, hash-verified

19
20
21def md_prefix(indent: int) -> str:
22 """
23 Markdown prefix based on indent for bullet points
24
25 >>> md_prefix(0)
26 '\\n##'
27 >>> md_prefix(1)
28 ' *'
29 >>> md_prefix(2)
30 ' *'
31 >>> md_prefix(3)
32 ' *'
33 """
34 return f"{indent * ' '}*" if indent else "\n##"
35
36
37def print_path(old_path: str, new_path: str) -> str:

Callers 2

print_pathFunction · 0.85
print_directory_mdFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected