Elts={
    'B':[10,11],
    'C':12,
    'N':14,
    'O':16,
    'OH':17,
    'F':19,
    'Na':23,
    'Mg':24,
    'CN':26,
    'Al':27,
    'Si':28,
    'P':31,
    'S':32,
    'SH':33,
    'Cl':[35,37],
    'TiO':[64,65],
    'TiO2':[80,81],
    'Cs':133,
    'Au':197
    }

def html_table(t, header=False):
    S = "<table>"
    if header:
        S += "<tr>"+"".join(["<th>{0}</th>".format(x) for x in t[0]])+"</tr>"
        t = t[1:]
    for x in t:
        S += "<tr>"+"".join(["<td>{0}</td>".format(y) for y in x])+"</tr>"
    S += "</table>"
    return S
    
def aa_table(t, header=False):
    """
    print a list of list in a nice ascii-art
    """
    Ncols=len(t[0])
    Lcol=[0]*Ncols
    for x in t:
        for i in range(Ncols):
            Lcol[i]=max(Lcol[i],len(repr(x[i])))
    if header:
        print("  ".join([u"{: <"+str(Lcol[i]+4)+"}" for i in range(Ncols)]).format(*t[0]))
        print("="*sum(Lcol))
        t=t[1:]
    for j,x in enumerate(t):
        print("  ".join([u"{:"+['.','_'][j%2]+"<"+str(Lcol[i]+4)+"}" for i in range(Ncols)]).format(*x))
    

def dict_update(d, u):
    import collections
    for k, v in u.items():
        if isinstance(v, collections.Mapping):
            r = dict_update(d.get(k, {}), v)
            d[k] = r
        else:
            d[k] = u[k]
    return d
@@ -271,16 +271,124 @@
 %0A    %7D%0A%0A
+def show_table(t):%0A    from IPython.core.display import display, HTML%0A    display(HTML(html_table(t)))%0A    %0A
 def html
@@ -1424,8 +1424,197 @@
 return d
+%0A    %0Adef fact(x):%0A    import math%0A    f=%5B%5D%0A    i=2%0A    while True:%0A        while x%25i == 0:%0A            f.append(i)%0A            x /= i%0A        i += 1%0A        if x == 1:%0A            return f

Add func for factorization