Returns a random card from the Stack. If ``remove=True``, it will
    also remove the card from the deck.

    :arg bool remove:
        Whether or not to remove the card from the deck.

    :returns:
        A random Card object, from the Stack.

def random_card(cards, remove=False):
    """
    Returns a random card from the Stack. If ``remove=True``, it will
    also remove the card from the deck.

    :arg bool remove:
        Whether or not to remove the card from the deck.

    :returns:
        A random Card object, from the Stack.

    """
    if not remove:
        return random.choice(cards)
    else:
        i = random.randrange(len(cards))
        card = cards[i]
        del cards[i]
        return card