def lines(a, b):
    """Return lines in both a and b"""
    # Get lines
    lines_of_a = a.split('\n')
    lines_of_b = b.split('\n')

    # Use a set to store the line, beacuse
    # it's a better structure for string
    # and avoids duplicates values
    equal_lines = set()

    # Compares the lines
    for line_of_a in lines_of_a:
        if line_of_a in lines_of_b:
            equal_lines.add(line_of_a)

    return equal_lines