New at Python, so please...

Just came across *comprehensions* and I understand that they are soon going to possibly ramify into perhaps dot products or matrix multiplications (although the fact that the result is a set makes them more interesting), but I at this point I want to ask whether there is any formula to determine the length of a comprehension such as:

`{x * y for x in {3, 4, 5} for y in {4, 5, 6}}`.

Evidently I don't mean for this particular one: 

`len({x * y for x in {3, 4, 5} for y in {4, 5, 6}}) = 8`, but of any general operation of this type with an element-wise multiplication of two sets, and taking as the result the set of the resultant integers (no repetitions), *for any given length of x and y, consecutive integers, and known x[1] and y[1]*.

I understand that this question is at the crossroads of coding and math, but I am asking it here on the off chance that it *happened* to be a somewhat common, or well-known computational issue, since I have read that comprehensions are very widely used. It is only in this sense that I am interested in the question. Base on the comments so far, my sense is that this is not the case.

EDIT:

For instance, here is a pattern: If `x = {1, 2, 3}` the `len(x * y)` comprehensions is equal to 9 provided `y[1] = or > 3`. For example, `len({x * y for x in {1, 2, 3} for y in {1111, 1112, 1113}}) = 9`. So tentatively, **length = length(x) \* length(y)**, provided there is no overlap in the elements of x and y. Does it work with 4-element sets? Sure: `len({x * y for x in {1, 2, 3, 4} for y in {1111, 1112, 1113, 1114}}) = 16`. In fact, the integers don't need to be consecutive, *just not overlap*: `len({x*y for x in {11,2,39} for y in {3,4,5}}) = 9`. 

And, yes, it doesn't work... Check this out:

`{x * y for x in {0, 1, 3} for y in {36, 12, 4}} = {0, 4, 12, 36, 108}`