Create a function that produces a list of all cards that have a rank higher than base_card?
<p>I have to create a function higher_in_rank that consumes a card, base_card, and produces a list of all cards which have a rank higher than base_card, sorted by increasing order of rank. The ranking of cards is as follows:</p>

<ul>
<li>In terms of suits, clubs are lower than diamonds, which are lower than hearts, which are lower than spades, regardless of the value.</li>
<li>If two cards have the same suit, the card with the larger value has higher rank.</li>
</ul>

<p>For example:</p>

<pre><code> higher_in_rank(card('spades', 8)) =&gt; [card('spades', 9), card('spades', 10)] 
 higher_in_rank(card('diamonds', 6)) =&gt;
    [card('diamonds',7), card('diamonds', 8), ..., card('hearts',1),
    ..., card('hearts',10), card('spades', 1), ..., card('spades', 10)]
</code></pre>

<p>I have no idea where to even begin with this. I have the following:</p>

<pre><code>class card:
    'Fields: suit, value'
    def __init__(self, suit, value):
        self.suit = suit
        self.value = value
    def __repr__(self):
        return '{suit} {value}'.format(suit=self.suit,value=self.value)
  # A card is an object card(suit, value) where
  # * suit is one of 'clubs', 'spades', 'diamonds', 'hearts', and
  # * value is an integer in the range 1..10

def higher_in_rank(base_card):
    if base_card.suit == 'clubs':
        return     #clubs, diamonds, hearts, spades
    if base_card.suit == 'diamonds':
        return     #diamonds, hearts, spades
    if base_card.suit == 'hearts':
        return     #hearts, spades
    if base_card.suit == 'spades':
        return     #spades
</code></pre>

<p>I don't know how to create the code for this.</p>
