Team(name, members) holds a list. Write clone_team(team) using copy.deepcopy so mutating the clone's members list never touches the original, and shallow_clone_team(team) using copy.copy to demonstrate the shared-list pitfall. Return both from the respective functions.t = Team('core', ['ana']); c = clone_team(t); c.members.append('raj'); len(t.members)1
Deep copy isolated the nested list.
copy.copy duplicates the object but shares nested mutables.
copy.deepcopy recurses.