We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 71f5b39 commit 8bdfca8Copy full SHA for 8bdfca8
Week03/sequences_Helin_Harman.py
@@ -0,0 +1,11 @@
1
+def remove_duplicates(seq: list) -> list:
2
+ return list(set(seq))
3
+
4
+def list_counts(seq: list) -> dict:
5
+ counts = {}
6
+ for item in seq:
7
+ counts[item] = counts.get(item, 0) + 1
8
+ return counts
9
10
+def reverse_dict(d: dict) -> dict:
11
+ return {value: key for key, value in d.items()}
0 commit comments