Discuss / Python / 。
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 ? order by score', (low, high))
        values = cursor.fetchall()
        l = list(map(lambda x: x[0], values))
        print(values)
        print(map(lambda x: x[0], values))
        print(l)
        return l

  • 1

Reply