The logic error seems to be that you have the second for loop where you only want to destructure the splitted line into a tuple. Now writing that decomposition as a for loop over a one-element list (as in the corrected code) works, but seems "hmhm".
In other words, the misunderstanding here is that you want a chain of generators, not a "nested for loop"-generator.<p>A more proper solution could be to chain the generator expressions:
with<p><pre><code> lines = ["a,b", "c,d"]
</code></pre>
you could do<p><pre><code> ((a,b) for a, b in (l.split(',') for l in lines))</code></pre>
<i>(0x00800513),x10,0x8</i><p>Well, I'm not a Python guy, but I saw something that would have been a bug. As numbers, the line above's variables would evaluate to<p><pre><code> 0x00800513 0x0000 0x8
</code></pre>
In a language like C, in a compilation, that 'x10' would throw up a 'variable not declared' error. As data, it would most likely evaluate as above to zero (depending on the data-handling code).