<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>yoshitaku_jp</author_name>
  <author_url>https://blog.hatena.ne.jp/yoshitaku_jp/</author_url>
  <blog_title>よしたく blog</blog_title>
  <blog_url>https://yoshitaku-jp.hatenablog.com/</blog_url>
  <categories>
    <anon>Python</anon>
  </categories>
  <description>Pythonでは、よく使われる組み込みコンテナの dict、list、set、tuple に代わる特殊なコンテナがあり、collectionsモジュールにまとまっている。今回はその中にある辞書型のサブクラスであるCounterを使ってリストなどの要素の出現回数を数え、簡単に集計をしてみる。 まずは、Counterを使わなかった場合の実装になる。 printと空行を除けば、7行での実装になる。 programming_languages = ['Python', 'Ruby', 'Go','Python','JavaScript', 'Go','Python','TypeScript','Pyt…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fyoshitaku-jp.hatenablog.com%2Fentry%2F2022%2F07%2F10%2F220000&quot; title=&quot;PythonのCounterクラスを使って要素の出現回数を集計する - よしたく blog&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn.user.blog.st-hatena.com/default_entry_og_image/152575302/1527834878412731</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2022-07-10 22:00:00</published>
  <title>PythonのCounterクラスを使って要素の出現回数を集計する</title>
  <type>rich</type>
  <url>https://yoshitaku-jp.hatenablog.com/entry/2022/07/10/220000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
