Let $X$ be a topological space with a countable basis $B = \{B_n\}_{n\in \mathbb{N}}$. Show that exists a countable subset $D\subseteq X$ such that $\overline{D} = X$.
Well, I've thought a lot about this question and this is what I've come up, but I think I'm cheating:
We all know that $X\subseteq X$ and that $\overline{X} = X$, and also every element of $x$ is contained in a basis element. So, since $X = \bigcup_{x\in X} \{x\} \subseteq \bigcup_{x\in X} B_x = X$, so taking $D = X$, we have that $D\subseteq X, \overline{D} = X$ and $D$ is countable. I don't think this is right, and this only works for $D = X$.
Could somebody help me?
Hint: Choose any element $q_n\in B_n$ for each $n\in\mathbb{N}$. Show that $Q=\{q_n \mid n\in\mathbb{N}\}$ is a dense subset of $X$.