There is only 1 ? placeholder in your sql statement but you want to pass a list of values and this is syntactically wrong.
You could use:
cursor.execute("SELECT * FROM basicinfo WHERE id IN ?", ("(1, 2)",))
but this would lead to this sql statement:
SELECT * FROM basicinfo WHERE id IN '(1, 2)'
which is not what you want because the ? placeholder would be replaced by the string literal '(1, 2)' and not a list of values.
In this case you can use the operator LIKE:
cursor.execute("SELECT * FROM basicinfo WHERE ',' || ? || ',' LIKE '%,' || id || ',%' ", ("1,2",))
You will have to remove parentheses and spaces from the comma separated list of values.