so i have this project for school that I'm making and in it we need to make a change to a list named board. We also have to return the changes that we have made in form of a sequence. I defind "board" as a list of tuples and sets and made a function that changes a specific set in "board", then i made another function that looks like this:
def function (board,pos):
#pos is a tuple (x,y)
begin_open_positions = board[2]
disclose_help(board,pos)
#this function changes the board
end_open_positions = board[2]
added_pos = begin_open_positions-end_open_positions
return added_pos
#board at the start = [(4, 4), [(0, 0)], set(), ((0, 0), (0, 1), (0, 1))]
#board at the end =[(4, 4), [(0, 0)], {(1, 2), ... ,(1, 1)}, ((0, 0),...)]
the question is why does my begin_open_position change and how can i make it so it doesnt change and stays (in this case) set().
the disclose help function just adds positions to board[2]
edit: i tried to use copy.copy(x) didnt work