Finding number of elements in $A_1\times \cdots \times A_n$ by induction I am asked to prove that

For every set $A_1,A_2,...A_k$ such that $|A_i|=n_i$ it holds:
$$|A_1\times A_2\times\cdots\times A_k|=n_1\cdot n_2\cdots n_k.$$

I tried by setting $2$ base cases: $|A_1|=n_1$ and $|A_1\times A_2|=n_1n_2$. My hypothesis is $|A_1\times A_2\times \cdots \times A_k|=n_1n_2\cdots n_k$. I start using associativity:
\begin{align}
|A_m|&=|A_1\times A_2|=n_m \\
|A_f|&=|A_1\times A_2\times A_3|=|A_m\times A_3|=n_m*n_3=n_f \\
&...\\
|A_T|&=|A_f\times A_4\times \cdots \times A_k|=n_T .
\end{align}
Then:
$$|A_1\times A_2\times \cdots \times A_k \times A_{k+1}|=|A_T\times A_{k+1}| $$
$$|A_T\times A_{k+1}|=n_T*n_{k+1}=n_1n_2\cdots n_kn_{k+1}=|A_1\times A_2 \times\cdots \times A_k\times A_{k+1}|=n_1n_2\cdots n_kn_{k+1}.$$
I was just wondering if this could be a correct proof, thanks.
 A: 
$\color{purple}{\textbf{Alternate Solution:}}$
Let $|A_i| = b_i \in \mathbb{N}~$ for any $i \in \{1, \dots, n\}$

On the other hand, we can just show that there exists a bijection between the sets
$$ f : \left\{1, 2, 3, \dots, \prod_{k = 1}^n b_k \right\} \to A_1 \times A_2 \times \cdots \times  A_n    \quad \text{for any } i \in \{1, 2, 3, \dots, n \}$$
Such that $f(i) = (a_{1,i}, a_{2,i},\dots, a_{n,i}) $
Then we have that:
$$ f(i) = f(j) \implies (a_{1,i}, a_{2,i},\dots,
 a_{n,i}) = (a_{1,j}, a_{2,j},\dots, a_{n,j}) \implies a_{1, i} = a_{1, j} \iff i = j $$
Thus, we have that $f$ is one-one.
Then for any $j \in \mathbb{N}$, we have that $f(j) = (a_{1,j}, a_{2,j},\dots, b_{n,j})$. Now on varying $j \in \left\{1, 2, 3, \dots, \prod_{k = 1}^n b_k \right\}$ we have that $f\left( \left\{1, 2, 3, \dots, \prod_{k = 1}^n b_k \right\} \right) = A_1 \times A_2 \times A_3 \times \cdots \times A_n$. Hence, $f$ is surjective.
Thus, we have that
$$ \left| \left\{1, 2, 3, \dots, \prod_{k = 1}^n b_k \right\} \right| = |A_1 \times A_2 \times A_3 \times \cdots \times A_n| $$ $$ \implies |A_1 \times A_2 \times \cdots \times A_n| = \prod_{k = 1}^n b_k = |A_1| \times |A_2| \times \cdots \times |A_n| $$
