def column(value, *columns, **kwargs):
    """
    Extract one or more columns from a tab-separated format. If more than one
    index is provided, a list is returned; if only one index is provided, only
    the value is returned.

    The value of `sep` is used to split the columns, so for example, to parse
    CSV files, you could use something like column(1, 2, sep=","). By default
    tabs are used.
    """
    pieces = value.split(kwargs.get("sep", "\t"))
    if len(columns) == 1:
        return pieces[columns[0]]
    else:
        return [pieces[i] for i in columns]