Dec-02-2019, 06:44 PM
If you look at product(values, suits) you get <itertools.product at 0xa2cfb71908>.
This is no list, this is an iterator.
If you do list(product(values, suits)) than the list() functions takes all tuples from product() one after another and creates the list of tuples.
So using the list comprehension [f'{v}{s}' for v,s in itertools.product(values, suits)] you get the desired list and time is O(n*m).
Please accept this. I won´t answer to any more complaints from you about this matter. Sorry.
This is no list, this is an iterator.
If you do list(product(values, suits)) than the list() functions takes all tuples from product() one after another and creates the list of tuples.
So using the list comprehension [f'{v}{s}' for v,s in itertools.product(values, suits)] you get the desired list and time is O(n*m).
Please accept this. I won´t answer to any more complaints from you about this matter. Sorry.