>>> import copy >>> a = 0 >>> b = 2 >>> a = copy.copy(b) >>> b += 1 >>> a 2 >>> b 3
for copying files instead of copy.copy use: new_var = copy.deepcopy(file)