# When can an open set be written as a finite number of disjoint open intervals?

It is a well-known fact that any open set $$O$$ of real numbers may be written as the pairwise disjoint union of countably many open intervals $$I_n$$.

However, I am wondering: when is it possible to say that $$O$$ is a finite union of pairwise disjoint open intervals?

If $$O$$ is an interval, then this is trivial.

Are there more obvious/standard cases when we can say this for an open set $$O$$?

iff $$O$$ is a union of finitely many open intervals, but I suppose you know that already.
Maybe you are looking for something like $$O^c\cap\overline{O}$$ is finite?