(text)
return first
Returns the first non-empty line of a multi-line text
Returns the first non-empty line of a multi-line text
Returns the first non - empty line of a multi - line text
def first_line(text):
    """
    Returns the first non-empty line of a multi-line text
    """
    lines = map(strip, text.splitlines())
    lines = list(filter(None, lines))
    first = lines[0] if lines else ''
    return first
def first_line ( text ) : lines = map ( strip , text . splitlines ( ) ) lines = list ( filter ( None , lines ) ) first = lines [ 0 ] if lines else '' return first