Discuss / Python / 练习

练习

Topic source

浅言87780

#1 Created at ... [Delete] [Delete and Lock User]

def get_score_in(low,high):

    conn=sqlite3.connect(db_file)

    cursor=conn.cursor()

    cursor.execute('select name from user where score between ? and ? order by score',(low,high))

    values=cursor.fetchall()

    cursor.close()

    conn.commit()

    conn.close()

    return [v[0] for v in values]


  • 1

Reply