Inspecting the deep copy

Report a typo

From the topic, you know that the deepcopy() function doesn't clone all objects, for example, it doesn't clone integers. But it also doesn't clone some other objects. You should write a program that tells if this object will be duplicated by the deepcopy() function or not.

You should define a function solve(obj) which takes an object obj as an argument and returns True if the deepcopy function will clone this object and False otherwise. You do NOT have to call this function, just implement it.

Sample Input 1:

1

Sample Output 1:

False

Sample Input 2:

[2]

Sample Output 2:

True

Sample Input 3:

[1, [3]]

Sample Output 3:

True
Write a program in Python 3
import copy


def solve(obj):
pass
___

Create a free account to access the full topic