Skip to content

Commit bb7c851

Browse files
authored
Merge pull request #57 from MFarid77/patch-2
Create sequences_farid_mammadov.py
2 parents ad72c84 + 1417b7b commit bb7c851

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

Week02/sequences_farid_mammadov.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
my_list = [1, 2, 3, 2, 4, 5, 1]
2+
my_tuple = (1, 2, 3, 4, 5)
3+
my_set = {1, 2, 3, 4, 5}
4+
my_dict = {
5+
"name": "farid",
6+
"surname": "mammadov"
7+
}
8+
9+
def remove_duplicates(input_list):
10+
return list(set(input_list))
11+
12+
def list_counts(input_list):
13+
counts = {}
14+
for item in input_list:
15+
counts[item] = counts.get(item, 0) + 1
16+
return counts
17+
18+
def reverse_dict(input_dict):
19+
return {value: key for key, value in input_dict.items()
20+
}

0 commit comments

Comments
 (0)