How to convert the following tuple:
from:
((\'aa\', \'bb\', \'cc\'), \'dd\')
to:
(\'aa\', \'bb\', \'cc\', \'dd\')
>>> tuple(j for i in (('aa', 'bb', 'cc'), 'dd') for j in (i if isinstance(i, tuple) else (i,)))
('aa', 'bb', 'cc', 'dd')
x = (('aa', 'bb', 'cc'), 'dd')
tuple(list(x[0]) + [x[1]])
l = (('aa', 'bb', 'cc'), 'dd')
l = l[0] + (l[1],)
This will work for your situation, however John La Rooy's solution is better for general cases.
a = (1, 2)
b = (3, 4)
x = a + b
print(x)
Out:
(1, 2, 3, 4)