I need my variable monthS to stay as I declared it and I created a new list monthS1 where I want to remove the last value inside a while loop. It all works except for my initial variable changing alongside monthS1.
>>> monthS = ["AUG23","SEP23","OCT23","NOV23","DEC23"]
>>> monthS1 = monthS
>>> monthS1.pop()
>>> monthS1
["AUG23","SEP23","OCT23","NOV23"]
>>> monthS
["AUG23","SEP23","OCT23","NOV23"]
I tried using remove and got the same results.