Implement the Python function specified below. Return ONLY the indented function body, without repeating the…
Implement the Python function specified below. Return ONLY the indented function body, without repeating the…: a task in unslop-harbor (Harbor dataset). def all prefixes(string: str) - List str : """ Return list of all prefixes from shortest to longest of the input string all prefixes('abc') 'a'…
The task
def all_prefixes(string: str) -> List[str]: """ Return list of all prefixes from shortest to longest of the input string >>> all_prefixes('abc') ['a', 'ab', 'abc'] """
Part of rawmodels/unslop-harbor.