>>> d = {} >>> keys = range(256) >>> vals = map(chr, keys) >>> map(operator.setitem, [d]*len(keys), keys, vals)
It is from python library. What does [d]*len(keys) mean? d is the name of dict but put d in [] really confused me. -- https://mail.python.org/mailman/listinfo/python-list