Poker Hand

This commit is contained in:
2023-07-02 22:29:37 +02:00
parent a6aaee5504
commit 683c8bf233

10
pokerhand.py Normal file
View File

@@ -0,0 +1,10 @@
cards = input().split()
ranks = [c[0] for c in cards]
sranks = set(ranks)
strength = [0, None]
for sr in sranks:
s = ranks.count(sr)
if s > strength[0]:
strength[0] = s
strength[1] = sr
print(strength[0])