I need to convert a list to tuple I am passing this tuple to a sql in clause. When there is only one element in the list the tupple is retrieving and extra element how do we avoid that. I referred the list to tuple below but unable to find the answer to avoid extra element
Convert list to tuple in Python
>>> taskid="10030"
>>> l = taskid.split(",")
>>> l
['10030']
>>> t = tuple(l)
>>> t
('10030',)
>>> query = f"""select * from table1 where task_id in {tuple(t)} ) query_temp"""
Please let know the apt solution