def check_hand(a,b,c,d,e): list_hands = [a,b,c,d,e] for i in list_hands: if list_hands.count(i) > 1: result = "ONE PAIR" for j in list_hands: if list_hands.count(j) == 2 and j != i: result = "TWO PAIR" elif list_hands.count(j) == 3 and j != i: result = "FULL HOUSE" else: result = "NO PAIR" return result