# how to print the weight multiplicites in a column

 0 I work with D2=WeylCharacterRing("D2")  and I am interested in D2(1,0).weight_multiplicities() {(0, 1): 1, (1, 0): 1, (-1, 0): 1, (0, -1): 1}  I would like to have this result in a column. I tried as follows: for a in D2(1,0).weight_multiplicities(): print a (0, 1) (1, 0) (-1, 0) (0, -1)  But now, I didn't have the multiplicities (the number after ":"). I would like to obtain (0, 1): 1 (1, 0): 1 (-1, 0): 1 (0, -1):1  How can I do? Thanks.-. asked Apr 24 '12 emiliocba 45 ● 6

 1  sage: d=D2(1,0).weight_multiplicities() sage: for k in range(len(d)): print d.keys()[k],":",d.values()[k] ....: (0, 1) : 1 (1, 0) : 1 (-1, 0): 1 (0, -1): 1  posted Apr 24 '12 achrzesz 1691 ● 4 ● 16 ● 38
 1 sage: for a in D2(1,0).weight_multiplicities().items(): print a ....: ((0, 1), 1) ((1, 0), 1) ((-1, 0), 1) ((0, -1), 1)  posted Apr 24 '12 achrzesz 1691 ● 4 ● 16 ● 38

[hide preview]