Let $(X,d)$ be a metric space and $A \subset X$ a connected subset. Let $B \subset X$ s.t. $A\subset B \subset \overline A$. Then $B$ is connected. I have a proof in my textbook that I understand except one thing:
Let $f:X \rightarrow {\{0,1}\}$ be a continuous function. $f$ is constant on $A$ and let $m:=f(a)_{\forall a \in A}$
For all $b \in B$ there exists a sequence $(a_n)\in A$ that converges to b
$f$ being continuous and by uniqueness of a limit, we conclude that $f(a_n)$ converges to $f(b)=m$. Therefore B is connected.
What ensures the existence of $a_n$? Is it because $B \subset \overline A$, therefore $B$ contains the limit points of $A$ (not all obviously)?
The fact that $B\subset\overline A$. The elements of $\overline A$ are those elements of $X$ which are the limit of some sequence of elements of $A$.