I am trying to prove the following: 'If $(X_1,d_1)$ and $(X_2,d_2)$ are separable metric spaces (that is, they have a countable dense subset), then the product metric space $X_1 \times X_2$ is separable.' It seems pretty straightforward, but I would really appreciate it if someone could verify that my proof works.
Since $(X_1,d_1)$ and $(X_2,d_2)$ are separable, they each contain a countable dense subspace, say $D_1 \subset X_1$ and $D_2 \subset X_2$. We will show that $D_1 \times D_2 \subset X_1 \times X_2$ is dense and countable. First, $D_1 \times D_2$ is countable since both $D_1$ and $D_2$ are.
Now let $x=(x_1,x_2) \in X_1 \times X_2$ and let $d$ be the product metric on $X_1 \times X_2$ (given by $d(x,y)=(\displaystyle\sum_{i=1}^2 d_i(x_i,y_i)^2)^{1/2}$). We will show that every open ball $B_d(x,\varepsilon)$ containing $x=(x_1,x_2)$ also contains a distinct point of $D_1 \times D_2$. Let $a_1 \in B_{d_1}(x_1,\frac{\sqrt{2}}{2}\varepsilon)\cap D_1$ and let $a_2 \in B_{d_2}(x_2,\frac{\sqrt{2}}{2}\varepsilon)\cap D_2$ (such points exist because $D_1$ and $D_2$ are dense in $X_1$ and $X_2$, respectively.) Letting $a=(a_1,a_2)$, we then have $d(x,a)=(\displaystyle\sum_{i=1}^2 d_i(x_i,a_i)^2)^{1/2})=(d_1(x_1,a_1)^2 + d_2(x_2,a_2)^2)^{1/2} < ((\frac{\sqrt{2}}{2}\varepsilon)^2 + (\frac{\sqrt{2}}{2}\varepsilon)^2)^{1/2}=\varepsilon$, so we have that $a \in B_d(x,\varepsilon)$, so $D_1 \times D_2$ is dense in $X_1 \times X_2$. Then since $D_1 \times D_2 \subset X_1 \times X_2$ is a countable dense subspace of $X_1 \times X_2$, we have that $X_1 \times X_2$ is separable.
I can see how this would easily generalize to finite products, but does it also extend to countable products?