Q:

How to vertically print 2d list with different lengths in python

In fact this I try to do. 
I have a class call card
class Card(object):
def __init__(self, value, folldown,canMove):
    self.value = value
    self.folldown = folldown
    self.canMove=canMove

And I use this to print
for i in range(len(cards)):
  for j in range(len(cards[i])):
       print cards[i][j].value

I want to print a 2d list with different sizesa=[[0, 1], [0, 1, 2], [0, 1, 2, 3]]
an I want to print like this
0 0 0
1 1 1
  2 2
    3

I was trying to print like this 
for i in range(len(a)):
  for j in range(len(a[i])):
       print a[i][j]

but the result was
0
1
0
1
2
0
1 
2 
3 

A:

a = [[0, 1], [0, 1, 2], [0, 1, 2, 3]]
print '\n'.join(['\t'.join([str(x[i]) if len(x) > i else '' for x in a]) for i in range(len(max(a)))])

#0    0    0
#1    1    1
#     2    2
#          3

