ajout cours algo + tris

This commit is contained in:
2022-03-17 22:54:29 +01:00
parent 755d143b0e
commit d6f426c186
8 changed files with 514 additions and 1 deletions

View File

@@ -0,0 +1,11 @@
import csv
def import_csv(fichier):
lecteur = csv.DictReader(open(fichier + '.csv', 'r'))
return [dict(ligne) for ligne in lecteur ]
def select(table, critere):
def test(ligne):
return eval(critere)
return [ligne for ligne in table if test(ligne)]