Thank you! Would never have found that by myself.
"Paul Rubin" <[email protected]> wrote in message news:[email protected]...
"Alex van der Spek" <[email protected]> writes:refd=dict.fromkeys(csvr.fieldnames,[]) ... I do not understand why this appends v to every key k each time.You have initialized every element of refd to the same list. Try refd = dict((k,[]) for k in csvr.fieldnames)instead.
-- http://mail.python.org/mailman/listinfo/python-list
