python: changes to my copy variable affect the original variable
I’ve got a list that I create a copy of in order to do some manipulations while still keeping the original list. However, when I set copy_list equal to org_list, they become the same thing, and if I change copy_list, org_list changes too. For example: org_list = ['y', 'c', 'gdp', 'cap'] copy_list = org_list copy_list.append('hum') … Read more