Di dieu aya script Python anu ngajalankeun query SQL ngagunakeun modul sqlite3 sareng ngahasilkeun hasilna salaku daptar kamus: sql ngimpor sqlite3 conn = sqlite3.connect('database.db') kursor = conn.cursor() query = "SELECT id, jarak, laju, rute FROM ngajalankeun ORDER BY jarak DESC LIMIT 5" kursor.execute(query) hasil = kursor.fetchall() # Convert hasilna kana daptar kamus baris = [] pikeun hasilna: baris = { "id": hasil[0], "jarak": hasil[1], "pace hasilna[2], "route": hasil[3] } rows.appendrow) kursor) conn.close hasilna) Aksara ieu mimiti nyambung ka database SQL difetch, sareng objékna.
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence