Python Object-Oriented Python Advanced Objects Frustration

Mathew Yangang
Mathew Yangang
Python Web Development Techdegree Student 4,433 Points

Altering the return value

How do I alter the 'return' value for me to return the wrong result?

frustration.py
class Liar(list):
    def __len__(self):
        result = super().__len__()
    return result

1 Answer

Steven Parker
Steven Parker
167,906 Points

An easy alteration would be just to add some fixed value to it., like 1 perhaps. Though it might be more fun to add the age of your pet, or your car.