from:https://segmentfault.com/q/1010000000140472 filter: apply the given filtering criterion to a copy of this Query, using SQL expressions.e.g.:session.query(MyClass).filter(MyClass.name == 'some name') filter_by: apply the given filtering criterion…
# b = filter(lambda x:x>5,[1,2,3,4,5,6,7]) # print(list(b)) def filters(x): if x > 5: return x b = filter(filters,[1,2,3,4,5,6,7]) print(list(b))#[6, 7] def maps(x): if x > 5: return x b = map(maps,[1,2,3,4,5,6,7]) print(list(b))#[None, None, Non…