def extract_rows(data, *rows):
    """Extract rows specified in the argument list.

>>> chart_data.extract_rows([[10,20], [30,40], [50,60]], 1, 2)
[[30,40],[50,60]]
"""
    try:
        out = []
        for r in rows:
            out.append(data[r])
        return out
    except IndexError:
        raise IndexError('data=%s rows=%s' % (data, rows))
    return out
