def sum_signs(exprs):
 is_pos = all([expr.is_positive() for expr in exprs])
 is_neg = all([expr.is_negative() for expr in exprs])
 return (is_pos, is_neg)

def sum_signs ( exprs ) : is_pos = all ( [ expr . is_positive ( ) for expr in exprs ] ) is_neg = all ( [ expr . is_negative ( ) for expr in exprs ] ) return ( is_pos , is_neg )
give the sign resulting from summing a list of expressions .