Enumerating all 3-tuples (Posting On Python-List Prohibited)

Ben Bacarisse ben.usenet at bsb.me.uk
Tue Mar 13 21:18:11 EDT 2018


Lawrence D’Oliveiro <lawrencedo99 at gmail.com> writes:

> On Tuesday, March 13, 2018 at 1:58:48 PM UTC+13, Ben Bacarisse wrote:
>> Of course you can always generate n-tuples of N and then map these to
>> n-tuples of the intended sequence but that seems inelegant.
>
> This whole discussion seems to be going off on esoteric, irrelevant
> tangents. The problem was not that hard to solve.

Sure, but that's one thing that makes Usenet (and email lists)
interesting.  The original problem -- triples of natural numbers -- is
not particularly hard, but the general problem -- enumerating n-tuples
of some sequence -- is more interesting because it is a bit harder.

-- 
Ben.



More information about the Python-list mailing list