Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

If your tables are the same length, you can try to make just one table - I do this sometimes.

a=[[i,i^2] for i in range(0,10)]
b=[[i,i^3] for i in range(0,10)]
c=[flatten(z) for z in zip(a,b)]

As a corollary for your case (not the same length), it's possible to insert None and then replace that with ''. Here's one I've actually used. It's a bit annoying, but doable. In this case I really didn't know how big they would be ahead of time, because n was potentially much bigger than 7.

L = map(None,[p for p in prime_range(n+1) if p%4==1],[p for p in prime_range(n+1) if p%4==3])
L = [['',l[1]] if l[0] is None else l for l in L]
T = [['$p\equiv 1\\text{ mod }(4)$','$p\equiv 3\\text{ mod }(4)$']]