data = [[1, 2], [3, 4], [5, 6]]
output = []
for each_list in data:
for element in each_list:
output.append(element)
print(output)
# Out: [1, 2, 3, 4, 5, 6]
data = [[1, 2], [3, 4], [5, 6]]
output = [element for each_list in data for element in each_list]
print(output)
# Out: [1, 2, 3, 4, 5, 6]
ZGF0YSA9IFtbMSwgMl0sIFszLCA0XSwgWzUsIDZdXQpvdXRwdXQgPSBbXQpmb3IgZWFjaF9saXN0IGluIGRhdGE6CiAgICBmb3IgZWxlbWVudCBpbiBlYWNoX2xpc3Q6CiAgICAgICAgb3V0cHV0LmFwcGVuZChlbGVtZW50KQpwcmludChvdXRwdXQpCiMgT3V0OiBbMSwgMiwgMywgNCwgNSwgNl0KCmRhdGEgPSBbWzEsIDJdLCBbMywgNF0sIFs1LCA2XV0Kb3V0cHV0ID0gW2VsZW1lbnQgZm9yIGVhY2hfbGlzdCBpbiBkYXRhIGZvciBlbGVtZW50IGluIGVhY2hfbGlzdF0KcHJpbnQob3V0cHV0KQojIE91dDogWzEsIDIsIDMsIDQsIDUsIDZd
[1, 2, 3, 4, 5, 6]
[1, 2, 3, 4, 5, 6]