Finally, after passing the data to PostgreSQL, we must commit the data to the database:
connection.commit()
Now we have constructed the basic parts of our function 'insert'. Put together, the parts look like this:
connection = psycopg.connect('dbname=Birds', 'user=robert')
mark = connection.cursor()
statement = 'INSERT INTO ' + table + ' (' + columns + ') VALUES (' + values + ')'
mark.execute(statement)
connection.commit()

