def intersection(rectangle1,rectangle2):
    """
     return True of False if rectangle1 and rectangle2 intersect
     Note: rectangles may be single points as well, with xupper=xlower etc.
     arguments:
        rectangleX: list [xlower,ylower,xupper,yupper]


    """
    xl1 = rectangle1[0]
    yl1 = rectangle1[1]
    xu1 = rectangle1[2]
    yu1 = rectangle1[3]

    xl2 = rectangle2[0]
    yl2 = rectangle2[1]
    xu2 = rectangle2[2]
    yu2 = rectangle2[3]

    nonintersection = (xl1>xu2)|(xl2>xu1)|(yl1>yu2)|(yl2>yu1)
    intersection = not nonintersection

    return intersection