Advertisement
AlexPt

Untitled

Apr 11th, 2020
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.40 KB | None | 0 0
  1. def is_full_house(deck):
  2.     result = [x for x in deck if x == deck[0]]
  3.     if len(result) == 1:
  4.         return False
  5.     temp = [x for x in deck if x != result[0]]
  6.     another_result = [x for x in temp if x == temp[0]]
  7.     if len(another_result) == 1:
  8.         return False
  9.     if len(result) > len(another_result) or len(result) < len(another_result):
  10.         return True
  11.     else:
  12.         return False
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement