python编程模板_常用python编程模板汇总
#!/usr/bin/python# -*- coding: UTF-8 -*-import MySQLdb# 打开数据库连接db = MySQLdb.connect("localhost","testuser","test123","TESTDB" )# 使用cursor()方法获取操作游标cursor = db.cursor()# SQL 插入语句sql = """INSERT IN