Given a list of playing cards as strings in the format "Rank-Suit" (e.g. "3-H"), find the highest card; rank precedence 2<...<10<J<Q<K<A, suit precedence H<D<C<S on ties.
Asked in the Onsite coding round stage. The problem was printed, solved on the candidate's own laptop, and evaluated by an invigilator.
Implement highest_card(cards). The input is a non-empty list of card strings, and the output is the original string representing the highest card. If multiple identical cards occur, return that card string.
def highest_card(cards):