> Isn't this at least as readable, and conceptually simpler? > > if ext in res_dict: > res_dict[ext] += 1 > else: > res_dict[ext] = 1
I get that a lot too and often propose my one-liner. This is not a matter of flagging a mistake, just showing another way. It's a chance to learn dict methods better and hey, they're paying to have a pro coach. Kirby _______________________________________________ Edu-sig mailing list Edu-sig@python.org http://mail.python.org/mailman/listinfo/edu-sig