Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~115 People Reached
Favorite Forums
Favorite Tags
Member Avatar for orangepyth

This code changes anum but it should not?? What is going wrong? Many thanks >>> astr=['a','b','c','d'] >>> anum=[4,3,2,1] >>> anew=anum >>> for c,d in enumerate(anum): ... anew[c]=astr[c] ... print(anew,astr,anum) ... ['a', 3, 2, 1] ['a', 'b', 'c', 'd'] ['a', 3, 2, 1] ['a', 'b', 2, 1] ['a', 'b', 'c', 'd'] …

Member Avatar for orangepyth
0
115