def rotate_90(grid):
    """
    Rotate a given grid by 90 degrees.

    Args:
        grid: Grid to rotate.

    Returns:
        Grid after being rotated by 90 degrees.
    """
    new_grid = []
    for col, _ in enumerate(grid):
        new_row = []
        # Go through the rows,
        # and form new rows depending on the flower's column.
        for row in grid:
            new_row.append(row[col])
        new_grid.append(new_row)
    return new_grid[::-1]