Question · Python course · Module 3: Object-Oriented Programming

__len__

When is the __len__ method called?

Answer options

  • When creating an object
  • When calling len(object)
  • When deleting an object
  • When comparing objects

You can check the correct answer by solving this task in the CodeWorlds game.