Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def is_full_house(deck):
- result = [x for x in deck if x == deck[0]]
- if len(result) == 1:
- return False
- temp = [x for x in deck if x != result[0]]
- another_result = [x for x in temp if x == temp[0]]
- if len(another_result) == 1:
- return False
- if len(result) > len(another_result) or len(result) < len(another_result):
- return True
- else:
- return False
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement