# Proving a topological space is separable

I am trying to prove the following statement: Prove that if (X,d) is a compact metric space, then X must be separable.

Where separable means the following: We say a topological space is separable if it has a countable dense subset.

I think the strategy behind this would be to use the fact that a compact metric space is sequentially compact, meaning that every sequence in X has a convergent sub sequence in X (use this to prove the limit point p to which such sub sequence converges to is also in X. This making X dense).

I am uncertain of how to prove the countability of such set. I was thinking about using the set:

{{B(x,d) | x is an element of X}}

Extracting a finite subcover and constructing a subset contained in X by removing a particular open ball Bi(x,d). I am not sure as to whether or not the balls are countable sets themselves.

I really appreciate you taking the time to read through and help :)

Looking at covers by open balls is a good idea, but not in quite the manner that you seem to have in mind. For $n\in\Bbb Z^+$ let
$$\mathscr{U}_n=\left\{B\left(x,\frac1n\right):x\in X\right\}\;;$$
this is an open cover of $X$, so it has a finite subcover $\mathscr{V}_n$. This means that there is a finite $F_n\subseteq X$ such that
$$\mathscr{V}_n=\left\{B\left(x,\frac1n\right):x\in F_n\right\}\;;$$
Now see what you can do with the set $D=\bigcup_{n\in\Bbb Z^+}F_n$.