Consider the ternary (base 3) representation of numbers in the interval $[0, 1]$. Just like how $1$ can also be represented as $0.999...$ in decimal, $1/3$ can be represented as $0.1$ or $0.0222...$ in base 3. Also, $2/3$ can be represented as $0.2$ or $0.1222...$ in base 3. In between $1/3$ and $2/3$, all numbers start with $0.1...$ in base 3. Therefore, when we remove the middle third from $[0, 1]$, we remove exactly the numbers that start with $0.1...$ in base 3. For interval boundaries, we have 2 choices for base 3 representations, so we use the ones that don't contain $1$.
As we continue removing intervals to build the Cantor set, at each step $n$, we remove exactly the numbers that have $1$ at position $n$ in their ternary representation. The Cantor set consists of exactly the numbers that don't have $1$ anywhere in their ternary representation. Thus, there is a 1:1 mapping between the cantor set and $\{0, 2\}^\mathbb{N}$. Namely, each number in the Cantor set has a sequence of $\{0, 2\}$ as its ternary representation.