Skip to content

Commit b5729a2

Browse files
authored
Create sequences_beyza_sungar.py
1 parent 32db533 commit b5729a2

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

Week02/sequences_beyza_sungar.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
my_list = [1,2,3,4,5]
2+
my_tuple = (3,6,9,9,8,7,4,5,4)
3+
my_set = {4,7,8,7,8,9}
4+
my_dict = {"name" : "Beyza",
5+
"surname" :"Sungar",
6+
"city" : "Eskişehir",
7+
"age" : 22}
8+
9+
def remove_duplicates(my_list)
10+
return list(set(my_list))
11+
12+
def list_counts(my_list)
13+
counts = {}
14+
for item in input_list:
15+
if item in counts:
16+
counts[item] += 1
17+
else:
18+
counts[item] = 1
19+
return counts
20+
21+
def reverse_key(dictionary):
22+
return {value: key for key, value in dictionary.items()}

0 commit comments

Comments
 (0)