Skip to content

Commit 0063c50

Browse files
authored
Merge pull request #75 from iremdilsatkse/patch-2
Create sequences_irem_dilsat_kose.py
2 parents 262ac5b + ce4a1cd commit 0063c50

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
my_list = [1, 5, 8, "x", 9]
2+
my_tuple = (7, 4, 1)
3+
my_set = {3, 5, 7}
4+
my_dict = {"name":"İrem", "surname":"Köse", "age":23}
5+
6+
def remove_duplicates(a_list):
7+
return list(set(a_list))
8+
9+
def list_counts(a_list):
10+
a_dict = {}
11+
for i in a_list:
12+
if i not in a_dict :
13+
a_dict[i]=1
14+
else:
15+
a_dict[i]+=1
16+
return a_dict
17+
18+
def reverse_dict(a_dict):
19+
new_dict = {}
20+
for key, value in a_dict.items():
21+
new_dict[value] = key
22+
return new_dict

0 commit comments

Comments
 (0)