A stricter definition of ordered n-tuples that avoids the following problem

In set theory, once ordered pairs are defined, one can define ordered triples, quadruples, etc, in the following way: $(a,b,c)=((a,b),c)$, $(a,b,c,d)=((a,b,c),d)$, etc. However, this definition is unsatisfactory to me, because, for instance, $(a,b,c)$ is both an ordered pair and an ordered triple. Basically, I want a definition of an ordered $n$-tuple, where $n$ is a positive integer, such that an $n$-tuple and a $m$-tuple are equal only when $n=m$, and corresponding elements are equal also. I also want the proof that the given definition actually satisfies that property.


My personal preference is to define an ordered $n$-tuple with elements from $X$ as a function $f:[n]\to X$. This trivially satisfies your requirements. The only drawback is that an ordered pair is not the same as an ordered $2$-tuple. This doesn’t bother me. Your mileage may vary.