itertools.chain
is said to convert chain('ABC', 'DEF') --> A B C D E F
. Yet, I see that
>>> Set(itertools.chain([(1,2,3),(4,5,6)]))
Set([(4, 5, 6), (1, 2, 3)])
I see that no hierarchy is affected. Similarly, list(itertools.chain([[1,2,3],[4,5,6]]))
is said to have effect on lists. But I see no flattening in my case
>>> list(itertools.chain([[1,2,3],[4,5,6]]))
[[1, 2, 3], [4, 5, 6]]
What the hell is going on?