"clone" is too vague. You have at least 2 options with a tuple/list
tree2 = tree1
creates a reference to tree1, i.e. they both point to the same block of memory, so if you change one, you change both. For a copy, you have to convert to a list.
- import copy
-
tree1 = ('tree', 'tree_bottom', 'tree_base')
-
tree2 = tree1
-
print tree2
-
print id(tree2), id(tree1) ## they are the same
-
-
tree3 = copy.copy(list(tree1)) ## shallow copy (look it up)
-
print tree3
-
print id(tree3), id(tree1) ## they are different