I am randomly picking a value from a list and then removing it from the original list. I am doing this within a function and the list is out of the function. I print the list and it is in the list but, it still says it isn't.
import random
CC = ["T:G","N:F"]
CCr = CC
random.shuffle(CCr)
def Get(CCran):
print("CC: ", CC)
if len(CCr) > 0:
card = CCran[0]
del CCran[0]
else:
random.shuffle(CC)
CCran = CC
card = CCran[0]
del CCran[0]
Act = card[0:2]
if Act == "T:":
print("T")
#Below gives a value error.
CC.remove("T:G")
Get(CCr)
What am I doing wrong?