I just typed the code bellow. I expected John to be a memeber of team_B only. When I run the code, John is beeing added to both teams, even when I use "deepcopy":
import copy
class team:
players = []
team_A = team()
team_A.players.append("Tom")
team_A.players.append("Peter")
team_A.players.append("Mario")
team_B = copy.deepcopy(team_A)
team_B.players.append("John")
Could anyone explain this and help me fix it?