You can also use list methods to do this, which I think should work regardless of the version of Python:
max_len = max(len(i) for i in a)
[[i[o] if len(i) > o else None for i in a] for o in range(max_len)]
Output:
[[1, 4, 7], [2, 6, 8], [3, None, 9]]
This gives you the ability to do anything you want in the absence of values.
max_len = max(len(i) for i in a)
[[i[o] for i in a if len(i) > o] for o in range(max_len)]
Output:
[[1, 4, 7], [2, 6, 8], [3, 9]]
, @gboffi, , :
l = [len(i) for i in a]
[[i[o] for ix, i in enumerate(a) if l[ix] > o] for o in range(max(l))]