def points_from_columns(xs):
    """
    Takes a list of rows and converts it into
    a list of columns. For example,
        xs = [[1, 2, 3], [4, 5, 6], [1], [2, 4]]
    will return
        x = [[1, 4, 1, 2], [2, 5, 4], [3, 6]]
    xs: list of rows (lists).
    returns: list of columns (lists).
    """
    x = []
    for row in xs:
        while len(x) < len(row): x.append([])
        for i in range(len(row)): x[i].append(row[i])
    return x