apt.shansen at gmail.com
Fri Oct 9 20:10:50 CEST 2009
On Fri, Oct 9, 2009 at 11:04 AM, Victor Subervi <victorsubervi at gmail.com>wrote:
> So, because the results in sstp were duplicates ( ['prescriptions',
> 'prescriptions'] ) it only returned one result in the dict(zip()) statement.
> Weird. Bug or feature? ;)
zip() returned two results, but dictionaries are mappings of keys to values.
If you duplicate a key, you don't get multiple values for that key -- you
replace the value. If you want something dictionary like which has multiple
values, try something like:
Or even this dict subclass:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list