from collections import defaultdict

#ranks. Add (rank of cards involved / 13) to these values
#for straights and flushes, (highest card / 13) is added
###########
hand_str_dict = {
    'high card': 0,
    'pair' = 1,
    'two_pair' = 2,
    'three_kind' = 3,
    'straight' = 4,
    'flush' = 5,
    'full_house' = 6,
    'four_kind' = 7,
    'straight_flush' = 8,
}

def eval_hand(hole, community):
    result = 0.0
    hand_ranks = defaultdict(int)
    hand_suits = defaultdict(int)

    for card in hole:
        rank = card["rank"]
        hand_ranks[rank] += 1
        suit = card["suit"]
        hand_suits[suit] += 1

    for card in community:
        rank = card["rank"]
        hand_ranks[rank] += 1
        suit = card["suit"]
        hand_suits[suit] += 1

    for card in hand_ranks
        

if __name__ == "__main__":

    result = eval_hand([{"rank":11, "suit":'S'},{"rank":2, "suit":'D'}], [{"rank":2, "suit":'D'}])
    print result
@@ -206,17 +206,17 @@
  'pair' 
-=
+:
  1,%0A    
@@ -226,17 +226,17 @@
 o_pair' 
-=
+:
  2,%0A    
@@ -248,17 +248,17 @@
 e_kind' 
-=
+:
  3,%0A    
@@ -268,17 +268,17 @@
 raight' 
-=
+:
  4,%0A    
@@ -285,17 +285,17 @@
 'flush' 
-=
+:
  5,%0A    
@@ -307,17 +307,17 @@
 _house' 
-=
+:
  6,%0A    
@@ -328,17 +328,17 @@
 r_kind' 
-=
+:
  7,%0A    
@@ -358,45 +358,173 @@
 sh' 
-=
+:
  8,%0A%7D%0A%0A
-def eval_hand(hole, community
+# 0: very low, 1: have a flush%0Adef eval_flush_potential(hand_suits):%0A    pass%0A    #for card in hand_suits:%0A        #if card%5B%22suit%22%5D%0A%0Adef eval_hand_priv(cards
 ):%0A 
@@ -539,27 +539,32 @@
 t = 0.0%0A    
-han
+%0A    car
 d_ranks = de
@@ -578,27 +578,27 @@
 ct(int)%0A    
-han
+car
 d_suits = de
@@ -633,12 +633,13 @@
  in 
-hole
+cards
 :%0A  
@@ -664,35 +664,35 @@
 %22rank%22%5D%0A        
-han
+car
 d_ranks%5Brank%5D +=
@@ -722,35 +722,35 @@
 %22suit%22%5D%0A        
-han
+car
 d_suits%5Bsuit%5D +=
@@ -756,188 +756,201 @@
 = 1%0A
-%0A
     
-for card in community:%0A        rank = 
+    %0A    return max(
 card
-%5B%22
+_
 rank
-%22%5D%0A        hand_ranks%5Brank%5D += 1%0A        suit = card%5B%22suit%22%5D%0A        hand_suits%5Bsuit%5D += 1%0A%0A    for card in hand_ranks%0A        
+s.items(), key = lambda x: x%5B1%5D)%5B1%5D%0A%0Adef eval_hand(hole, community):%0A    return ( eval_hand_priv(hole) + eval_hand_priv(community) ) - eval_hand_priv(community)
 %0A%0Aif
@@ -978,32 +978,24 @@
 _%22:%0A
-%0A
     
-result = eval_hand(
+community = 
 %5B%7B%22r
@@ -1003,10 +1003,9 @@
 nk%22:
-11
+2
 , %22s
@@ -1014,20 +1014,33 @@
 t%22:'
-S'%7D,
+C'%7D%5D%0A    hole = %5B
 %7B%22rank%22:
 2, %22
@@ -1027,33 +1027,34 @@
 hole = %5B%7B%22rank%22:
-2
+11
 , %22suit%22:'D'%7D%5D, 
@@ -1051,15 +1051,12 @@
 t%22:'
-D'%7D%5D, %5B
+S'%7D,
 %7B%22ra
@@ -1074,16 +1074,55 @@
 t%22:'D'%7D%5D
+%0A    result = eval_hand(hole, community
 )%0A    pr

Implement ranks to eval_hand.