I'm given a nested structure of tuples with 2 elements each, and want to convert it to a flat structure
I've tried using * to loop through and flatten, but am stuck since each tuple is nested in another one
Example input: (((((1, 2), 3), 4), 5), 6)
Example output: (1, 2, 3, 4, 5, 6)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…