j
k
j a
j l
In [12]: a= mdict(a=[2], b='a') In [13]: a+a
Aren't you reinventing the Counter type?
......from collections import Counter c = Counter(a=1,b=2) c + c Counter({'b': 4, 'a': 2})
...from collections import Counter c = Counter(a=1,b=2) c + c Counter({'b': 4, 'a': 2})
from collections import Counter c = Counter(a=1,b=2) c + c Counter({'b': 4, 'a': 2})
Attachments:
Back to the thread
Back to the list