Skip to content

Commit 4364f9e

Browse files
committed
Create sequences_orkun_altınyelken.py
1 parent f716918 commit 4364f9e

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
my_list = ["Ataturk", "a", "b", "c", "c", "a", "a"]
2+
my_tuple = (1, 2, 3)
3+
my_set = {"Emma D'Arcy", "Matt Smith", "Paddy Considine"}
4+
my_dict = {'Name': "Acheron", "Occupation": "Galaxy Ranger", "Birth Year": "???"}
5+
6+
7+
def remove_duplicates(my_list):
8+
return list(set(my_list))
9+
10+
11+
def counter(the_list):
12+
counted = {}
13+
for element in the_list:
14+
counted[element] = counted.get(element, 0) + 1
15+
return counted
16+
17+
18+
def reverse_dict(dictionary):
19+
return dict(reversed(list(dictionary.items())))

0 commit comments

Comments
 (0)