def get_score_in(low, high):
' 返回指定分数区间的名字,按分数从低到高排序 '
try:
conn = sqlite3.connect(db_file)
cursor = conn.cursor()
cursor.execute('select name from user where score > %s AND score <= %s ORDER BY score' % (low,high))
datas = cursor.fetchall()
print(datas)
finally:
cursor.close()
conn.close()
return [x[0] for x in datas]
船长杰克