diff --git a/Tp4/etudiants/etudiant.py b/Tp4/etudiants/etudiant.py old mode 100755 new mode 100644 index cc793f301bcaed1c9dfc4e23087c1c2b8e0fb375..2fc9043e001dcb650d000ba65934b6835422336d --- a/Tp4/etudiants/etudiant.py +++ b/Tp4/etudiants/etudiant.py @@ -167,10 +167,10 @@ def ensemble_des_formations(liste: list[Etudiant]) -> Set[str]: $$$ ensemble_des_formations(COURTE_LISTE[0:2]) {'MI', 'MIASHS'} """ - - formations=Set() + res=[] + for etudiant in liste: - formations.add(etudiant.formation) - return formations + res.add(etudiant.formation) + return res \ No newline at end of file