Suppose we have a finite set $E$. Is it true that $E^n$ is compact? The metric on $E^n$ is : $$d(\omega,\omega\prime)=\begin{cases}2^{-\inf \{ n \in \mathbf N:\omega _n \ne \omega'_n\} }&{\omega \ne \omega '}\\ 0&{\omega = \omega '} \end{cases}$$
My idea is as below:
For an arbitrary sequence, projection on the first element will give a one dimensional sequence which has a repetitive subsequence. Considering this subsequence in the main infinite dimensional sequence one can continue this process to find for each $n$, a subsequence which has fixed $n$ elements in its first $n$ places. Unfortunately I cannot convince myself this solution can be extended for the infinite case(the whole sequence). Can someone give me a reason why this is correct for the whole sequence or do I need something else rather than this reasoning?
Thank you.