# Separable metrizable space has a countable basis

Let $X$ be a metrizable space that has a countable dense subset in $X$ ($X$ is called a separable metrizable space). Would you help me to prove that

-

HINT: Let $D$ be a countable dense subset of $X$, and let $$\mathscr{B}=\{B(x,r):x\in D\text{ and }r\text{ is a positive rational number}\}\;;$$
it’s easy to see that $\mathscr{B}$ is countable, but you’ll have to do a little work to show that it’s a base for $X$.