Poker Hand
This commit is contained in:
10
pokerhand.py
Normal file
10
pokerhand.py
Normal 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])
|
||||||
Reference in New Issue
Block a user