From 9be61644a458ecf6782e42a31f624290ec4bd055 Mon Sep 17 00:00:00 2001 From: Jethro Stapelbroek Date: Wed, 19 Jul 2023 20:51:49 +0200 Subject: [PATCH] Karte --- karte.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 karte.py diff --git a/karte.py b/karte.py new file mode 100644 index 0000000..e7478ef --- /dev/null +++ b/karte.py @@ -0,0 +1,9 @@ +cards = input() +cards = [cards[i : i + 3] for i in range(0, len(cards), 3)] +unique_cards = set(cards) +if len(cards) > len(unique_cards): + print("GRESKA") +else: + for suit in ('P', 'K', 'H', 'T'): + print(13-len([card for card in cards if card[0] == suit]), end=' ') + \ No newline at end of file