回答此问题可获得 20 贡献值,回答如果被采纳可获得 50 分。
<p>我有很多票务字典都是这样的:</p>
<pre><code>{'origin': u'HW',
'department': u'Intern',
'ticket-closed': False,
'prio-events': [(datetime.datetime(2015, 6, 8, 17, 30, 17, 490990, tzinfo=<LocalTimezone "UTC+02:00" 2:00:00>), u'Important')],
'status-events': [(datetime.datetime(2015, 6, 8, 17, 30, 17, 490990, tzinfo=<LocalTimezone "UTC+02:00" 2:00:00>), u'new'), (datetime.datetime(2015, 7, 22, 16, 41, 52, 408334, tzinfo=<LocalTimezone "UTC+02:00" 2:00:00>), u'developing')]}
{'origin': u'HW',
'department': u'Intern',
'ticket-closed': False,
'prio-events': [(datetime.datetime(2015, 6, 8, 17, 39, 34, 351329, tzinfo=<LocalTimezone "UTC+02:00" 2:00:00>), u'Important')],
'status-events': [(datetime.datetime(2015, 6, 8, 17, 39, 34, 351329, tzinfo=<LocalTimezone "UTC+02:00" 2:00:00>), u'new')}
{'origin': u'HW',
'department': u'Intern',
'ticket-closed': False,
'prio-events': [(datetime.datetime(2015, 6, 8, 17, 49, 58, 454331, tzinfo=<LocalTimezone "UTC+02:00" 2:00:00>), u'Important')],
'status-events': [(datetime.datetime(2015, 6, 8, 17, 49, 58, 454331, tzinfo=<LocalTimezone "UTC+02:00" 2:00:00>), u'new'), (datetime.datetime(2015, 7, 22, 16, 42, 49, 339349, tzinfo=<LocalTimezone "UTC+02:00" 2:00:00>), u'closed')]}
</code></pre>
<p>我想在<code>matplotlib</code>中制作一个饼图来显示有多少票是“new”、“developing”或“closed”,因此我需要检查<code>"status-events"</code>的最后一个值。我试过这样做,但它不起作用,我的计数器不会增加。在</p>
^{pr2}$