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

Ben Bacarisse ben.usenet at bsb.me.uk
Wed Mar 14 21:56:08 EDT 2018


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

> On Wednesday, March 14, 2018 at 2:18:24 PM UTC+13, Ben Bacarisse wrote:
>> Lawrence D’Oliveiro writes:
>> 
>> 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.
>
> It’s not harder--it’s exactly the same difficulty. You iterate the
> naturals, then interpose a function mapping them onto the set that you
> really want to use.

Yes, I said exactly that a couple of messages ago.

-- 
Ben.



More information about the Python-list mailing list