Le 09.12.2013 01:00, Gregory Ewing a écrit :
[email protected] wrote:def people(age): people=lambda age: [name for name in dic if dic[name]==age] but i don't get the lambda age part.Just to explain: YBM has tried to sabotage you by posting a solution that uses a couple of advanced Python features (lambda and list comprehensions) that a beginner would be unlikely to know about.
Oh! I've been caught! ;-) My point is not that I had a problem with the OP (btw asking for homework in a public group always irrates me), but that the teacher of the OP is incredibly stupid and illiterate (or should I say illluterate ?) So I tried to catch both. -- https://mail.python.org/mailman/listinfo/python-list
