i have array like below
arr = [1,2,3]
how can i convert it to '1,2,3'
using python
i have a usecase where i want to add a filter parameter to url like below
url = some_url?id__in=1,2,3
i was initially thinking to pass it like so
url = some_url?id__in={arr}
but this is incorrect. i am new to python and i have browsed how to do this.
" ".join(str(x) for x in arr)
but this will give output '1 2 3'
how can i fix this. could someone help me with this. thanks.