I've a list. I make the copy of that list. Now I want to append a number into its copy not into the original list. How would I do that?
a = [1,2,3]
b = a
b.append(4)
print a,b # prints [1, 2, 3, 4] [1, 2, 3, 4]
I want [1, 2, 3] [1, 2, 3, 4]
. How would I do that?