def prefixM(prefix, s):
    """为字符串添加前缀，对于多行字符串，每行都添加前缀"""
    if '\n' not in s:
        return prefix+s

    ret = ''
    lines = s.split('\n')
    lineCount = len(lines)
    for index in range(lineCount):
        ret += prefix
        ret += lines[index]
        if index != lineCount-1:  # 最后一行不要添加换行符
            ret += '\n'
    return ret