def lines(a, b):
    """Return lines in both a and b"""
    lines = []
    # Split string a into lines: \n
    # For each lines:
    for line in a.split("\n"):
        # Split string b into lines: \n
        # Check if line from a appears in b
        if line in b.split("\n"):
            # Check if the line is empty
            if line != "":
                # If not empty, append to list
                lines.append(line)
    return lines