def get_score_in(low, high):
' 返回指定分数区间的名字,按分数从低到高排序 '
with sqlite3.connect(db_file) as conn:
cursor = conn.cursor()
cursor.execute('select name from user where score between ? and ?', (low, high))
values = cursor.fetchall()
return map(lambda x: x[0], values)
xiongdezhi