human
Write me a the Python code you requested given the following:
I am working on the file "01-IPythonHintsAndTips.ipynb".
The first task is:
Displaying tables in HTML
http://calebmadrigal.com/display-list-as-table-in-ipython-notebook/
Can you write Python code for it?
assistant
#Here is the Python code you requested.

class ListTable(list):
    """ Overridden list class which takes a 2-dimensional list of 
        the form [[1,2,3],[4,5,6]], and renders an HTML Table in 
        IPython Notebook. """
    
    def _repr_html_(self):
        html = ["<table>"]
        for row in self:
            html.append("<tr>")
            
            for col in row:
                html.append("<td>{0}</td>".format(col))
            
            html.append("</tr>")
        html.append("</table>")
        return ''.join(html)

import random
table = ListTable()
table.append(['x', 'y', 'x-y', '(x-y)**2'])
for i in range(7):
    x = random.uniform(0, 10)
    y = random.uniform(0, 10)
    table.append([x, y, x-y, (x-y)**2])
    
table