I am newbie who can explain this code to me?

380162267qq at gmail.com 380162267qq at gmail.com
Tue Sep 20 08:12:34 EDT 2016


>>> 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.



More information about the Python-list mailing list