def standardise(self , other): if len(self.ListeMonomes) != len(other.ListeMonomes): if len(self.ListeMonomes) == max( len(self.ListeMonomes) , len(other.ListeMonomes) ): for i in range(len(self.ListeMonomes)-len(other.ListeMonomes)): other.ListeMonomes += [ monome(0 , len(other.ListeMonomes) + i) ] else: for i in range(len(other.ListeMonomes)-len(self.ListeMonomes)): self.ListeMonomes += [ monome(0 , len(self.ListeMonomes) + i) ] P = [m.coef for m in self.ListeMonomes] Q = [m.coef for m in other.ListeMonomes] return polynome(*P) , polynome(*Q)