O
opstad
I'm a little baffled by the inconsistency here. Anyone have any
explanations?
.... yield 'a'
.... yield 'b'
.... yield 'c'
....
['aa', 'ab', 'ac', 'ba', 'bb', 'bc', 'ca', 'cb', 'cc']
['aa', 'ab', 'ac']
Why does this last list only have three elements instead of nine?
explanations?
.... yield 'a'
.... yield 'b'
.... yield 'c'
....
['aa', 'ab', 'ac', 'ba', 'bb', 'bc', 'ca', 'cb', 'cc'][c1 + c2 for c1 in gen() for c2 in gen()]
['aa', 'ab', 'ac', 'ba', 'bb', 'bc', 'ca', 'cb', 'cc']
['aa', 'ab', 'ac']
Why does this last list only have three elements instead of nine?