
order= '23456789TJQKA'

def high_card(list):
    
    max=0
    #iterates through the input list and slices away the suit to leave ranks.
    for r in list:
        rank = r[0]
        ranking=order.index(rank)
        
    #finds the highest card according to the order       
        if ranking>=max:
            max=ranking
            highest= rank
    print(highest)
    

deck= input("Enter 5 cards:").split(', ')

high_card(deck)


order= '23456789TJQKA'

def high_card(list):
    
    max=0
    #iterates through the input list and slices away the suit to leave ranks.
    for r in list:
        rank = r[0]
        ranking=order.index(rank)
        
    #finds the highest card according to the order       
        if ranking>=max:
            max=ranking
            highest= rank
    print(highest)
    

deck= input("Enter 5 cards:").split(', ')

high_card(deck)

#iterates through the input list and slices away the suit to leave ranks. #finds the highest card according to the order