def _sanitize_usecols(usecols):
    if usecols is None:
        return None
    try:
        pats = usecols.split(',')
        pats = [p.strip() for p in pats if p]
    except AttributeError:
        usecols = [int(c) for c in usecols]
        usecols.sort()
        return tuple(usecols)
    cols = []
    for pat in pats:
        if ':' in pat:
            c1, c2 = pat.split(':')
            n1 = letter2num(c1, zbase=True)
            n2 = letter2num(c2, zbase=False)
            cols += range(n1, n2)
        else:
            cols += [letter2num(pat, zbase=True)]
    cols = list(set(cols))
    cols.sort()
    return tuple(cols)