def rect(x0, y0, x1, y1):
    """
    Allow drawing a rectangle.

    Args:
        x0 int: x starting point of the rectangle.
        y0 int: y starting point of the rectangle.
        x1 int: x ending point of the rectangle.
        y1 int: y ending point of the rectangle.

    Returns:
        list of tuples. Each tuple is a x,y pair representing points where the
            color should be changed.
    """
    dx = abs(x1 - x0) + 1
    dy = abs(y1 - y0) + 1
    rectComplete = []
    if x0 < x1:
        ix = 1
    else:
        ix = -1
    if y0 < y1:
        iy = 1
    else:
        iy = -1
    x = x0
    for i in range(dx):
        y = y0
        for j in range(dy):
            rectComplete.append([x, y])
            y += iy
        x += ix
    return rectComplete
