Suppose that $A_1, ..., A_n$ are countable sets. Show that the cartesian product $A := A_1 \times ... \times A_n$ is countable.
My attempt:
Sets are said to be countable if they are finite or if they have the same cardinality as some subset of $\mathbb{N}$ (i.e. we can find some bijection $f: A \rightarrow S$ or $f: S \rightarrow A$ where $S \subset \mathbb{N}$).
Assume that $A_1, ..., A_n$ are countable sets. Then, there exists bijections $fi: \mathbb{N} \rightarrow A_i$ for $i = 1, ..., n$.
Define $g: \mathbb{N} \rightarrow A$ as follows
My issue arises here in finding such a bijective function without it being too complicated. How would I go about finding one? I am also open to any suggestions. Any assistance is welcomed.