Let $X$ be a metric space and $D$ a set. Let $f: X \to D$. Show that $f$ is constant.
If $X$ is a connected metric space, then a locally constant function $f: X \to $ M, $M $ a metric space, is constant