As an output from a function, I get tuples in either the form a and b as shown below:
a = ((x, y), z)
b = (x, y)
I would like to flatten the nested form to be as follows:
a = (x, y, z)
This will always result in me having a tuple which is one layer deep, regardless of what I get as a return from my function.
What is the quickest and most efficient way to do this in Python 3?