html("

# From Dictionary to Matrix (1)

") @interact def newtarph( D=input_box(default={0: {1: 3}, 1: {0: 2, 4: 2, 5: 2}, 2: {0: 3, 1: 4}}, label='Dictionary')): E=[] for u in D.keys(): for i in range(len(D.values()[u])):
E.append([u, D.values()[u].keys()[i], D.values()[u].values()[i]]) print matrix(E)

 2 No.2 Revision Shashank 1887 ●24 ●45 ●80

html("

# html("<h1> From Dictionary to Matrix (1)

") 
(1)</h1>") @interact def newtarph( D=input_box(default={0: {1: 3}, 1: {0: 2, 4: 2, 5: 2}, 2: {0: 3, 1: 4}}, label='Dictionary')): E=[] for u in D.keys(): for i in range(len(D.values()[u])): E.append([u, D.values()[u].keys()[i], D.values()[u].values()[i]]) print matrix(E)matrix(E) 

### why cannot recalculate?

html("<h1> These code  work fine  html(" From Dictionary to Matrix (1)</h1>")
(1)")
@interact
def newtarph( D=input_box(default={0: {1: 3}, D=input_box(default={0:{1:3}, 1: {0: 2, 4: 2, 5: 2}, 2: {0: 3, 1: 4}}, label='Dictionary')):
E=[]
for u in D.keys():
for i in range(len(D.values()[u])):             E.append([u, D.values()[u].keys()[i], D.values()[u].values()[i]])
print matrix(E)

matrix(E)

These other code d'ont work:

html("

# From Dictionary to Matrix (1)

") @interact def newtarph( D=input_box(default={1: {0: 2, 4: 2, 5: 2}, 2: {0: 3, 1: 4}}, label='Dictionary')): E=[] for u in D.keys(): for i in range(len(D.values()[u])):
E.append([u, D.values()[u].keys()[i], D.values()[u].values()[i]]) print matrix(E)

 4 No.4 Revision Shashank 1887 ●24 ●45 ●80

### why cannot recalculate?

These code work fine

html("

# html("<h1> From Dictionary to Matrix (1)

") 
(1)</h1>") @interact def newtarph( D=input_box(default={0:{1:3}, 1: {0: 2, 4: 2, 5: 2}, 2: {0: 3, 1: 4}}, label='Dictionary')): E=[] for u in D.keys(): for i in range(len(D.values()[u])): E.append([u, D.values()[u].keys()[i], D.values()[u].values()[i]]) print matrix(E)matrix(E) 

These other code d'ont work:

html("

# html("<h1> From Dictionary to Matrix (1)

") 
(1)</h1>") @interact def newtarph( D=input_box(default={1: {0: 2, 4: 2, 5: 2}, 2: {0: 3, 1: 4}}, label='Dictionary')): E=[] for u in D.keys(): for i in range(len(D.values()[u])): E.append([u, D.values()[u].keys()[i], D.values()[u].values()[i]]) print matrix(E)matrix(E)