How to flatten a tuple in python

[(a, b, c) for a, (b, c) in l]

Tuple packing and unpacking solves the problem.

Leave a Comment