# Create a nested list of tuples
data = [
[(1, 2), (3, 4)],
[(5, 6), (7, 8)],
[(9, 10), (11, 12)]
]
# Print the entire structure
print("Nested list of tuples:", data)
# Flattening into a single list of tuples
flat_list = [tup for sublist in data for tup in sublist]
print("\nFlattened list:", flat_list)
'''
run:
Nested list of tuples: [[(1, 2), (3, 4)], [(5, 6), (7, 8)], [(9, 10), (11, 12)]]
Flattened list: [(1, 2), (3, 4), (5, 6), (7, 8), (9, 10), (11, 12)]
'''