summaryrefslogtreecommitdiff
path: root/progs/unparsable_programs/a493.py
diff options
context:
space:
mode:
Diffstat (limited to 'progs/unparsable_programs/a493.py')
-rw-r--r--progs/unparsable_programs/a493.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/progs/unparsable_programs/a493.py b/progs/unparsable_programs/a493.py
new file mode 100644
index 0000000..430263c
--- /dev/null
+++ b/progs/unparsable_programs/a493.py
@@ -0,0 +1,7 @@
+from collections import defaultdict
+def max_occurrences(nums):
+ dict = defaultdict(int)
+ for i in nums:
+ dict[i] += 1
+ result = max(dict.items(), key=lambda x: x[1])
+ return result \ No newline at end of file