After a lot of trial and error I have found the right way to pass value for “IN” using JavaScript and Python in ERPNext. Example SQL:
SELECT
tabEmployee.name,
tabEmployee.religion
FROM tabEmployee
WHERE tabEmployee.religion IN %(religions)s
Please read this article if you want to know how easy it is: