def select_rows(to_select):
    if type(to_select) is not list:
        to_select = [to_select]
for row in range(0, table.numRows()):
    if _table.item(row, 1).text() in to_select:
        table.selectRow(row)
Handle either a list or single integer as an argument