I've got a function that takes input and returns a 3 item tuple:
def f(a, b):
x = a + 1
y = x + 2
z = y + 3
return (x, y, z)
And I start with a set of tuples:
my_set = {(1, 2), (3, 4), ... (m, n)}
And I need to build a list, but the follow throws a TypeError:
[(a, b, x, y, z, (x, y, z)) for a, b in my_set for x, y, z in f(a, b)]
TypeError: 'int' object is not iterable
I was reviewing this post which shows a similar process, but for some reason the for x, y, z ...
is throwing the exception and I'm not sure if I am just overlooking something small or not.