Ad
  • Custom User Avatar

    I did not know that max() works with a list of strings :/

  • Custom User Avatar

    that's because in your init the list is probably pointing towards the base list, so when you delete in the object you also delete in the base list (what happens: a[0] returns 1 and deletes 1 from the a list and from the base list so base[0] returns 2 instead of 1). To avoid this, you need to do a "copy" of the base list without reference by doing something like this : self.list = baselist[:]