diff --git a/language/python/develop.md b/language/python/develop.md index 46650b4a0c..460ddaa4f6 100644 --- a/language/python/develop.md +++ b/language/python/develop.md @@ -121,15 +121,7 @@ def db_init(): cursor.execute("DROP DATABASE IF EXISTS inventory") cursor.execute("CREATE DATABASE inventory") - cursor.close() - - mydb = mysql.connector.connect( - host="mysqldb", - user="root", - password="p@ssw0rd1", - database="inventory" - ) - cursor = mydb.cursor() + cursor.execute("USE inventory") cursor.execute("DROP TABLE IF EXISTS widgets") cursor.execute("CREATE TABLE widgets (name VARCHAR(255), description VARCHAR(255))")