Cantor Space totally disconnected: Proof

In my lecture notes there we have the following proof that the Cantor space $K_{\infty}$ is totally disconnected:

Let $z<z'$ in $K_{\infty}$, then we can find a $l \geq0$ and an interval $I:=(z'', z''')$ with length $3^{-l}$ such that $I \subset (z, z')$ and $I \cap K_{\infty} = \emptyset$. The mapping $y\mapsto 1_{y \leq z''}$ with $z'' \in I$ is therefore continuous from $K_{\infty}$ to $\{0,1\}$. It follows that $z$ and $z'$ do not belong to the same connected component of $K_{\infty}$.

My first question is how we can see that this mapping is continuous?

If it is indeed continuous, we can say that because $z$ and $z'$ will get mapped to $0$ and $1$ respectively and because there is the interval $I$ between $z$ and $z'$ which does not belong to $K_{\infty}$ we can't find a continuos mapping between $z$ and $z'$. At this point, I am not sure if the above argument is correct or not (of course this has also partly to do with the first question).

The only point at which the function could be discontinuous is $z''$ (there is a jump at that point), but $z''$ does not belong to its domain. Therefore, the functions is continuous.
Since there is a continuous map $f\colon K_\infty\longrightarrow\mathbb R$ such that $f(z)=1$ and that $f(z')=0$, $z$ and $z'$ belong to distinct connected components of $K_\infty$. Since this happens for any two distinct elements of the Cantor set, this set is totally discontinuous.