立即学习:https://edu.youkuaiyun.com/course/play/24756/280729?utm_source=blogtoedu
import pymysql
db=pymysql.connect(host="127.0.0.1",port=3306,user="root",password="123456",database="csdn-study")
cursor=db.cursor()
#delete from 表名 where 条件
sql="delete from article where id>3 "
cursor.execute(sql)
db.commit()
db.close()