Greg Waitt6,599 Points
Need help validating answer
The code passes the "quiz" but I am having trouble validating the code. The list is printed and not the "liar length". What am I doing wrong? Thanks for your help.
class Liar(list): def __len__(self): lie=super().__len__() +3 return lie test2 = Liar(['a','b','c','d']) print(test2)
Myers CarpenterTreehouse Staff
Cool you are trying to make this work in the actual python REPL.
print(something) gets python to print out that something, but won't show the length. You want
print(len(something)) to print the length.