You can simplify statements like this by using `all` or `any` and a list comprehension.  This can be written as 

```py
if not all(coeff.is_Rational for coeff in l):
    return result
```