programming-examples/python/Tuple/Python program to create the colon of a tuple.py

9 lines
238 B
Python
Raw Normal View History

2019-11-15 12:59:38 +01:00
from copy import deepcopy
#create a tuple
tuplex = ("HELLO", 5, [], True)
print(tuplex)
#make a copy of a tuple using deepcopy() function
tuplex_clone = deepcopy(tuplex)
tuplex_clone[2].append(50)
print(tuplex_clone)
print(tuplex)