[Tutor] question about subroutine

Emma Sweetland ESweetland at bosworthschool.co.uk
Sat Sep 23 08:54:23 EDT 2023


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:
ESweetland at bosworthcollege.com<mailto:ESweetland at bosworthcollege.com>
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


More information about the Tutor mailing list