INNER CODE UNIT · Python

delete_space

idealo/image-quality-assessment · mkdocs/autogen.py:9

def delete_space(parts, start, end):
    if start > end or end >= len(parts):
        return None
    count = 0
    while count < len(parts[start]):
        if parts[start][count] == ' ':
            count += 1
        else:
            break
    return '\n'.join(y for y in [x[count:] for x in parts[start : end + 1] if len(x) > count])


def change_args_to_dict(string):
    if string is None:
        return None
    ans = []
    strings = string.split('\n')
    ind = 1

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…