Skip to content

Commit c2d2120

Browse files
authored
Create sequences_farid_mammadov.py
1 parent fbd4adc commit c2d2120

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

Week02/sequences_farid_mammadov.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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+
def remove_duplicates(input_list):
9+
return list(set(input_list))
10+
def list_counts(input_list):
11+
12+
counts = {}
13+
for item in input_list:
14+
counts[item] = counts.get(item, 0) + 1
15+
return counts
16+
def reverse_dict(input_dict):
17+
return {value: key for key, value in input_dict.items()
18+
}

0 commit comments

Comments
 (0)