Nov-10-2022, 12:49 AM
The number of permutations of 9 from 24 is enormous, but the number of combinations is much less. As a list, it is < 12MB.
Is there some way to interfere with the value of the next pointer in the class com_set?
Some way to pass it a random number as the stored value?
com_set = itertools.combinations(images, 9) # creates a list of tuples mylist = list(com_set) len(mylist) # 1307504 print(sys.getsizeof(mylist))
Output:>>> type(com_set)
<class 'itertools.combinations'>
>>> print(sys.getsizeof(com_set))
144
>>>
What I'm wondering is however:Is there some way to interfere with the value of the next pointer in the class com_set?
Some way to pass it a random number as the stored value?