+ 1

Poker Hand. So, I can't understand what's wrong with My code. Only Test 6 is unsuccessfull.

https://code.sololearn.com/c1NL3hxxpYLI/?ref=app

15th Apr 2023, 5:44 PM
Komilov Khayrullokhon
Komilov Khayrullokhon - avatar
2 Respostas
+ 6
Komilov Khayrullokhon Error: line 8 with 'Royal Flush' state for input "10H JH AH KH QH", suite code in line four RETURNS ["0","H","H","H","H"] WHEN EVER you convert suits list to set the length will be two and expression in if statement returns FALSE. [BUG]: Just there is a small bug in suits (line 4) the rest of the code is alive. [Solution]: instead of extracting second indexe of a card try to extract the last index. [Code ]: suits = [card[len(card)-1] for card in hand]
15th Apr 2023, 6:20 PM
Yasin Rahnaward
Yasin Rahnaward - avatar
+ 3
Thank you, very much:)
15th Apr 2023, 8:16 PM
Komilov Khayrullokhon
Komilov Khayrullokhon - avatar