class Storting: def __init__(self, l): self._land = l self._partier = [] def legg_til_parti(self, nytt_parti): if nytt_parti not in self._partier: self._partier.append(nytt_parti) def __str__(self): info = "Stortinget i " + self._land info += "\nPARTIER:\n" for p in self._partier: info += str(p) + "\n" return info