Let $(X,d)$ be a compact metric space. Show that $C(X,\mathbb{R})$ is a separable metric space (space of continuous functions from $X$ to $\mathbb{R}$).
I first showed that if $(X,d)$ is compact, then it must be separable, so we have a dense subset $\{x_{1},x_{2},...\}$ which is countable of $X$. Then, I'm not so sure on how to move forward. I was thinking of using the Stone Weierstrass Theorem for the set of functions:
$F=\{1,f_{1},f_{2},...\}$
Where $f_{n}(x)=d(x,x_{n})$ for $x \in X$. Then, this implies that the above set is dense in $C(X,\mathbb{R})$ and countable, so $C(X,\mathbb{R})$ is separable if $F$ is a unital separating subalgebra.
Clearly $F$ is unital, but I'm not sure on how to show it is separating and a subalgebra of $C(X,\mathbb{R})$ (it is a subset of the former set since the distance function is continuous). How would one proceed with this step?
Thank you for your help.