[Chennaipy] Python Quick Simple Thursday Tip - 8th Feb 2024

selvi dct selvi.dct at gmail.com
Thu Feb 8 12:58:38 EST 2024


#Code:
import itertools
a = [[1, 2], [3, 4], [5, 6]]
b = list(itertools.chain.from_iterable(a))
print(b)

#Output:
[1, 2, 3, 4, 5, 6]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/pipermail/chennaipy/attachments/20240208/a45cf4ce/attachment.html>


More information about the Chennaipy mailing list