Let $(X,d_X)$ be a [metric space](/page/Metric%20Space). Let $Y$ be a set equipped with the [discrete metric](/page/Discrete%20Metric) $d_Y$, so that $d_Y(y,z)=0$ if $y=z$ and $d_Y(y,z)=1$ if $y\neq z$. For a map $f:X\to Y$, the map $f:(X,d_X)\to (Y,d_Y)$ is continuous if and only if, for every $y\in Y$, the fiber $f^{-1}(\{y\})$ is open in $X$.