from matplotlib.pyplot import figure
T10,T11,T12,T13 = nx.random_tree(10),nx.random_tree(11),nx.random_tree(12),nx.random_tree(13)
T = [T10,T11,T12,T13]
for t in T: 
    print("The Pruefer Code for -",  pruefer_code(t))
    fig = figure()
    axis = fig.add_subplot(111)
    nx.draw(t, **opts, ax = axis)
    
Which results in:
The Pruefer Code for -  [2, 8, 1, 9, 5, 5, 6, 8]
The Pruefer Code for -  [9, 6, 10, 7, 4, 8, 10, 4, 6]
The Pruefer Code for -  [4, 1, 4, 8, 11, 11, 8, 3, 4, 8]
The Pruefer Code for -  [8, 7, 11, 4, 2, 7, 9, 1, 5, 10, 7]
Plus the graphs - how would I amend the code so it'd say:
The Pruefer Code for - T10 [2, 8, 1, 9, 5, 5, 6, 8]
The Pruefer Code for - T11 [9, 6, 10, 7, 4, 8, 10, 4, 6]
The Pruefer Code for - T12 [4, 1, 4, 8, 11, 11, 8, 3, 4, 8]
The Pruefer Code for - T13 [8, 7, 11, 4, 2, 7, 9, 1, 5, 10, 7]
Any help appreciated :)
 
    