[2BW]Note:Proposition 5.11.2 notes [ 3 ] .
A set \(E\subseteq X\) is disconnected if and only there exists a continuous function \(f:E\to {\mathbb {R}}\) that assumes exactly two values, for example \(f(E)=\{ 0,1\} \).