Constructing Leaf
Input
get_init_order()
Output
['Base', 'Mid', 'Leaf']
Leaf.__init__ should call super().__init__ which in turn will call Base.__init__ through Mid, producing the ordered list.
Full lesson preview
Practice using super() to ensure cooperative initialization across multiple inheritance levels.
Problem statement
Task
Examples
Input
get_init_order()
Output
['Base', 'Mid', 'Leaf']
Leaf.__init__ should call super().__init__ which in turn will call Base.__init__ through Mid, producing the ordered list.
Input format
Output format
Constraints
Samples
Input
Mid().order
Output
['Base', 'Mid']
Mid must call Base's initializer so instances of Mid have both 'Base' and 'Mid' in order.