Skip to content

Commit c2318ad

Browse files
authored
Merge pull request #32 from o-goldensail/master
Created types_orkun_altınyelken.py sequences_orkun_altınyelken.py
2 parents e36a03a + 9b6f761 commit c2318ad

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
my_list = ["Ataturk", "a", "b", "c", "c", "a", "a"]
2+
my_tuple = (1, 2, 3)
3+
my_set = {"Emma D'Arcy", "Matt Smith", "Paddy Considine"}
4+
my_dict = {'Name': "Acheron", "Occupation": "Galaxy Ranger", "Birth Year": "???"}
5+
6+
7+
def remove_duplicates(my_list):
8+
return list(set(my_list))
9+
10+
11+
def list_counts(the_list):
12+
counted = {}
13+
for element in the_list:
14+
counted[element] = counted.get(element, 0) + 1
15+
return counted
16+
17+
18+
def reverse_dict(dictionary):
19+
dictionary = {v: k for k, v in dictionary.items()}
20+
return dictionary

Week02/types_orkun_altinyelken.py

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

0 commit comments

Comments
 (0)