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 5ae1705 commit bbb0e4aCopy full SHA for bbb0e4a
Week03/sequences_aysegul_yildiz.py
@@ -0,0 +1,23 @@
1
+def remove_duplicates(seq):
2
+ sonuc = []
3
+ for oge in seq:
4
+ if oge not in sonuc:
5
+ sonuc.append(oge)
6
+ return sonuc
7
+
8
9
+def list_counts(seq):
10
+ sayimlar = {}
11
12
+ sayimlar[oge] = sayimlar.get(oge, 0) + 1
13
+ return sayimlar
14
15
16
+def reverse_dict(d):
17
+ ters = {}
18
+ for anahtar, deger in d.items():
19
+ if deger not in ters:
20
+ ters[deger] = [anahtar]
21
+ else:
22
+ ters[deger].append(anahtar)
23
+ return ters
0 commit comments