{}
                  
                  
                  country = gi.country_code_by_addr(peer['peer_host'])
                  
                  
                  if p[country]:
                  
                  
                        p.update({country: 1})
                  
                  
                  else:
                  
                  
                       p[country] += 1
                  
                  
                
p[country] = p.get(country, 0) + 1
P.setdefault(country,1)
в collections Counter есть
Обсуждают сегодня