与Python交互 python3模块名:pymysql conda install pymysql conda install sqlalchemy python2模块名:MySQLdb import pymysql # 1.创建与数据库连接对象 db = pymysql.connect(host='localhost', user='haoen110', password='123', database='db4', charset='utf8') # 2.利用db方法创建游标对象 cur…