From d2f328fb1e1f23ed293dddf2dafece470963c3f9 Mon Sep 17 00:00:00 2001 From: beytullaharslannn <151189674+beytullaharslannn@users.noreply.github.com> Date: Sat, 17 Oct 2026 20:34:41 +0300 Subject: [PATCH] Create sequences_beytullah_arslan.py --- Week03/sequences_beytullah_arslan.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 Week03/sequences_beytullah_arslan.py diff --git a/Week03/sequences_beytullah_arslan.py b/Week03/sequences_beytullah_arslan.py new file mode 100644 index 000000000..2ab93add9 --- /dev/null +++ b/Week03/sequences_beytullah_arslan.py @@ -0,0 +1,14 @@ +def remove_duplicates(seq: list) -> list: + return list(set(seq)) + +def list_counts(seq: list) -> dict: + dictionary = dict.fromkeys(seq, 0) + for item in seq: + dictionary[item] += 1 + return dictionary + +def reverse_dict(d: dict) -> dict: + new_dict = {} + for key, value in d.items(): + new_dict[value] = key + return new_dict