# Topological space that is not homeomorphic to the disjoint union of its connected components

As the title says, I'm looking for a counterexample to the statement that every topological space X is homeomorphic to the disjoint union of its connected components.

I know that this is in fact true if X is locally connected because this implies that the connected components are open, but unfortunately, I don't have a sufficient repertoire of examples of spaces that meet certain conditions (in this case, not being locally connected).

J.Dillinger

-

Two standard examples of totally disconnected spaces (that are not discrete) are $\mathbb{Q}$ (with the subspace topology from $\mathbb{R}$) and the product $\{ 0, 1 \}^{\mathbb{N}}$ of countably many copies of the two-point discrete space (homemorphic to both the Cantor set and, if I recall correctly, the $p$-adic integers).