4 ms·
That's actually a set being constructed from a generator expression -- a real set comprehension would look like this: subset = {word for word in valid if l
by iclelland 16y ago
That's actually a set being constructed from a generator expression -- a real set comprehension would look like this:
subset = {word for word in valid if len(word)==n}
but that's only available in Python 3.0.1+ or 2.7