question about subroutine

Emma Sweetland <[email protected]>
Newsgroups gmane.comp.python.tutor
Message-ID <CWLP123MB36669C7F809569EBDB452409E6FEA@CWLP123MB3666.GBRP123.PROD.OUTLOOK.COM>
I was wondering if someone could advise about what is going wrong with this subroutine.   With some debugging prints, I know the problem is definitely on line 9 when new[row][column] is assigned a new value.  That part is working but the problem is that it is also changing the corresponding value in grid which is the list from which new was originally copied (using append).  This is happening despite the fact that new and grid have different addresses (ids) so I don't understand how a change to new is affecting grid.  Any help gratefully received.  Thank you.

Emma Sweetland​
Teacher - Mathematics

E:
[email protected]<mailto:[email protected]>
W:      www.bosworthcollege.com<https://www.bosworthcollege.com/>
M:
T:
+44 1604 239 995
[cid:c69baae0-d942-4dfa-b7be-09ed03472196]
[cid:637d5568-d010-4e8d-9756-004cd338ad23]
[cid:6374fa7e-d9ca-4eaf-bf20-d9e56505b5fd]<https://www.facebook.com/BosworthCollege/>
[cid:857bfdde-db53-4e9d-8a20-9ca86c9a9b21]<https://www.instagram.com/bosworthindependentcollege/?hl=en>
[cid:b198bc7c-c119-47a3-849f-8999861a6ba2]<https://www.youtube.com/user/BosworthIndepCollege>
This e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this e-mail in error please notify the originator of the message. Any views expressed in this message are those of the individual sender, except where the sender specifies and with authority, states them to be the views of Bright Scholar (UK) Holdings Limited, trading as CATS Global Schools and/or subsidiary companies. In order to prevent fraudulent activity (including phishing), we will not request you to pay any invoices or monies into accounts other than the account stated within its own invoice(s). Any change to such accounts will be an exceptional occurrence and any such request, purported to be from us, should be subject to your own additional authentication or verification steps prior to making any such change or payment(s). This message has been scanned for malware by Office 365. www.office365.com
_______________________________________________
Tutor maillist  -  [email protected]
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.