Amazon Interview Question

OOP for python and optimisation