
1 gcweb 2014 年 1 月 21 日 是否一定需要这样的数据结构才能解决问题呢? 我总觉得需要这种hack的代码,本身结构上就需要调整。。。 |
2 pohuty 2014 年 1 月 22 日 In [2]: from collections import defaultdict In [3]: a = defaultdict(dict) In [4]: a['hell']['good']= 1 In [5]: a Out[5]: defaultdict(<type 'dict'>, {'hell': {'good': 1}}) |
5 gully 2014 年 1 月 24 日 |