Dec-02-2019, 05:33 PM
(Dec-02-2019, 05:16 PM)Clunk_Head Wrote: itertools.product(values, suits) must traverse values (len m) and for each must traverse suits (len n) to create the iterable that is returned. Then the iterable (len m*n) is traversed again by the list comprenesion. This makes the complexity double the length of the combined list, or 2*m*nIf we look here we see some code but read that "This function is roughly equivalent to the following code, except that the actual implementation does not build up intermediate results in memory"
which means that it is not as you described it to be.