I want to do something like:
all = [ x for x in t[1] for t in tests ]
tests looks like:
[ ("foo",[a,b,c]), ("bar",[d,e,f]) ]
So I want to have the result
all = [a,b,c,d,e,f]
My code does not work, Python says:
UnboundLocalError: local variable 't' referenced before assignment
Is there any simple way to do that?
It should work the other way around: