Liste_contact =[] class Contact: l=[] nb_contact = 0 def __init__(self ,nom ='' ,prenom='' , email ='' , tel ="" , whatsapp = "" ): self.nom=nom self.prenom= prenom self.email=email self.tel = tel self.whatsapp= whatsapp Contact.nb_contact +=1 self.nb=Contact.nb_contact self=[self.nom,self.prenom,self.email,self.tel,self.whatsapp] def afficher(self): ch = str(self.nb) print("Contact :" +ch +"\n Nom : "+self.nom +"\n Prenom : "+self.prenom +"\n Email : "+self.email +"\n Tel : "+self.tel +"\n Whatsapp : "+self.whatsapp) def Ajouter(self): Liste_contact.append(self) def Supprimer(self): Liste_contact.remove(self) def chercher_nom(phone): for l in liste_contact: nom, tel = liste if tel == phone: return nom def mes_contact(self): print("Liste de mes contact :") for i in Liste_contact: Contact.afficher(i) def Modifier(self): self.nom=input("Entre le nouveau nom :") self.prenom = input("Entre le nouveau prenom :") self.email = input("Entre le nouveau mail :") self.whatsapp = input("Entre le nouveau whatsapp :") self.tel = input("Entre le nouveau tel :") C=Contact('sidi','didi','sid@h.c','0011','144') C1=Contact('dddidi','mnndidi','sid@h.c','1111','1111') C.Ajouter() C1.Ajouter() C.mes_contact() C.Modifier()