Given a list containing several tuples like this: L = [(1, 2, 3), (3, 2, 1), (2, 1, 6), (7, 3, 2), (1, 0, 2)]
I want simply to remove the parentheses of tuples and join the numbers to create a list.
The output should be like this:
L = [1, 2, 3, 3, 2, 1, 2, 1, 6, 7, 3, 2, 1, 0, 2]
I tried the below code, it removed parentheses but add a single quotation ''.
for x in L:
mm = (', '.join(str(j) for j in x))
L2.append(mm)
print(L2)
Like this: L = ['1, 2, 3', '3, 2, 1',' 2, 1, 6', '7, 3, 2', '1, 0, 2']