DEV Community

Discussion on: A look at itertools chain method

Collapse
 
fernandosavio profile image
Fernando Sávio

I nice way to chain two sequences is unpacking them in a list literal. 😍

a, b = (1, 2), (3, 4)
print([*a, *b])
# [1, 2, 3, 4]