回答編集履歴

1

追記

2018/01/11 09:42

投稿

LouiS0616
LouiS0616

スコア35660

test CHANGED
@@ -15,3 +15,23 @@
15
15
  print(counter.most_common()[0][0])
16
16
 
17
17
  ```
18
+
19
+
20
+
21
+ 追記
22
+
23
+ ---
24
+
25
+ どうやら次の方法の方が簡潔なよう。
26
+
27
+ ```Python
28
+
29
+ from statistics import mode
30
+
31
+
32
+
33
+ tmp_list = [1, 1, 1, 1, 0, 1, 1]
34
+
35
+ print(mode(tmp_list))
36
+
37
+ ```