Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions Week02/sequences_ali_duman.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
my_list = [2, 4, 8, 16, 32, 64, 128, 256]

my_tuple = (11, 33, 55, "The", "Blacklist")

my_set = {"Raymond Reddington", "Elizabeth Keen", "Glen Carter"}

my_dict = {
"one": "I",
"two": "Had",
"three": "Bullets",
"four": "He",
"five": "Had",
"six": "Words"
}


def remove_duplicates(my_list):
return list(set(my_list))


def list_counts(my_list):
return {item: my_list.count(item) for item in my_list}


def reverse_dict(my_dict):
return {value: key for key, value in my_dict.items()}
4 changes: 4 additions & 0 deletions Week02/types_ali_duman.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
my_int = 12
my_float = 32.7
my_bool = True
my_complex = 8j