Skip to content

Commit 3189503

Browse files
authored
Merge pull request #87 from CengizhanBayram/master
#Cengizhan Bayram 1. commit
2 parents 0ec4b8d + 17e891e commit 3189503

File tree

2 files changed

+28
-0
lines changed

2 files changed

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

Week02/types_cengizhan_bayram.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
my_int = 42
2+
my_float = 42.1
3+
my_bool = False
4+
my_complex = 42+3j

0 commit comments

Comments
 (0)