I've got a function, which takes a single argument, runs a query and in the end returns some values after certain calculations.
My query is something similar to this:
def my_function(passed_argument):
query = Session.query(t).filter(t.column_c == passed_argument).all()
# ... do some work with query
return some_value
What I would like to achieve however is to: Pass the function a list (instead of a single argument) which contains multiple values and for t.column_c to match any of those.
Ex. Select * from t where column_c = my_list[0] or column_c = my_list[1] or column_c = my_list[2] .. and so on.
What's the way to do this?
Thank you.