Generation

code to explanationMon, 03 Apr 2023

# importing "copy" for copy operations import copy # initializing list 1 list1=[1,2,[3,5],4] # using deepcopy to deepcopy list2=copy.deepcopy(list1) id(list1), id(list2)

(140702411685624, 140702411685984)

Questions about programming?Chat with your personal AI assistant