Ad
  • Default User Avatar

    Try using a modified class, rather than a function.

  • Default User Avatar

    Assigning variable names which overwrite builtin methods should be avoided, as you never know starting out, whether you may need to use those methods later in the program.

    "mylist" or some variant is a better choice than just "list", as it does not overwrite the builtin list() method.