<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def delete(self, table_name, constraints=None):
 """Builds and executes an delete statement. :param table_name: the name of the table to delete from :param constraints: can be any construct that can be parsed by SqlWriter.parse_constraints. :return: a cursor object """

    if constraints is None:
      constraints = "1=1"
    where, params = self.sql_writer.parse_constraints(constraints)
    sql = "delete from {0} where {1};".format(table_name, where)
    self.execute(sql, params)