Bruno Desthuilliers <onurb at xiludom.gro> writes: > Too much useless lookup IMHO... Actually, you, me, and Amit all mis-read David's original exapmle. What he really wanted was (let's see if I get it right this time): if mykey in mydict: v = mydict[mykey] if not isinstance(v, list): v = [v] for val in v: ...