Feb-21-2018, 12:21 PM
Hi,
Can someone please help me understand what is the difference between this
The first one gives this result
Can someone please help me understand what is the difference between this
t = list(itertools.chain(*([1,2,3],[4,5,6])))
and y = list(itertools.chain(([1,2,3],[4,5,6])))
.The first one gives this result
[1,2,3,4,5,6]
whilst the second one gives a list of lists i.e. [[1,2,3],[4,5,6]]