Python classes are defined as in the following example:
class Book(object):
pass
Here the class is empty, without fields or methods, because the pass
statement in Python does nothing;
it just acts as a placeholder for possible future code.
Objects of a particular class are constructed by calling the constructor, which has the same name as the class and
is invoked without any new
keyword:
book = Book()
Define an empty class named Library
and construct a Library
object so that the actual
outputs match the expected outputs.