Q:

Is there a one liner for this?

Assuming search is expensive, is there a way to make this a one liner?
result = Product.search(query)
return result if result

Since the search is expensive, the following is out:
return Product.search(query) if Product.search(query)

A:

result = Product.search(query) and return result

