Discuss / Python / 粗暴解法

粗暴解法

Topic source

邪欢葉

#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>=? and score <=? order by score', (low, high, ))
    value = cursor.fetchall()
    L = [ele[0] for ele in value]
    cursor.close()
    conn.close()
    return L

  • 1

Reply