Creating a dict from list of key, value tuples while maintaining duplicate keys

前端 未结 3 715
情书的邮戳
情书的邮戳 2020-12-03 14:42

So I\'ve got a comprehension to the effect of:

dict((x.key, x.value) for x in y)

The problem, of course, is that if there\'s multiple

3条回答
提交回复
热议问题