Сбой QWebView при загрузке URL

С помощью collections.Counter вы можете сделать

>>> import collections
>>> stats = {'a':1000, 'b':3000, 'c': 100}
>>> stats = collections.Counter(stats)
>>> stats.most_common(1)
[('b', 3000)]

. Если нужно, вы можете просто начать с пустого collections.Counter и добавить к нему

>>> stats = collections.Counter()
>>> stats['a'] += 1
:
etc. 
0
задан Green Cell 18 January 2019 в 03:19
поделиться