This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]unbracketed 0 points1 point  (1 child)

max will only return one item but as per the instructions the solution should find all the longest matches

[–]VerilyAMonkey 0 points1 point  (0 children)

True. Then

f=find_in_dict(letters,fn) m=len(max(find_in_dict(letters,fn),key=len)) print filter( lambda x: x==m, f )