Solution (source code)

= Solution

Let $\mathcal B$ be a <topological basis> consisting of <clopen sets>. For $U\in\mathcal B$ its <characteristic function> $\chi_U:X\to\{0,1\}$ is <continuous>, since the preimages of both singleton values are <open>. Define
$$
e:X\to\{0,1\}^{\mathcal B},\qquad e(x)=(\chi_U(x))_{U\in\mathcal B}.
$$
The coordinate criterion for <product topology> makes this map <continuous>. If $x\ne y$, the $T_0$ property gives an <open set> containing one and not the other. A <topological basis> element contained in that <open set> still distinguishes them, so their corresponding characteristic coordinates differ. Therefore $e$ is <injective>.

Finally, for each <topological basis> element $U$,
$$
U=e^{-1}(\{z:z_U=1\}).
$$
The right-hand side is the preimage of an <open> cylinder in the product of discrete two-point <topological spaces>. These cylinders recover a <topological basis> for the <topology> of $X$, proving <continuity> of the inverse onto the image. Hence
$$
\boxed{X\text{ embeds homeomorphically into }\{0,1\}^{\mathcal B}.}
$$