def prepare_deck(deck, number_of_cards):
    """Prepare sub_deck, from deck leaving starting number_of_cards cards."""
    sub_deck = deck.copy()
    while len(sub_deck) != number_of_cards:
        sub_deck.pop()
    return sub_deck