六 与数据库对比 import pymssql def compare_expected_vs_db(): diff_list = [] # 存储不一致的代码 with pymssql.connect(server=',database='db') as myconnect: with myconnect.cursor(as_dict=True) as cursor: cursor.execute("SELECT top 10 code,content FROM [db].[dbo].[tabl…