I am attempting to add items to a new list from a primary list, then remove those moved items from the primary list. Essentially use and discard.
I have already attempted to use list comprehensions (Remove all the elements that occur in one list from another). Then I attempted to use a for loop as well as an if statement to check for the elements and remove them, though when I printed the original list once again, nothing changed.
Not sure what I am doing wrong but it is extremely frustrating:
your_hand_list = []
computer_hand_list = []
computer_hand_list.append (random.sample(card_list, 5))
your_hand_list.append (random.sample(card_list, 5))
print (your_hand_list, computer_hand_list)
for card in your_hand_list and computer_hand_list:
if card in card_list:
card_list.remove(card)