top of page
Search

PYTHON CODING

  • Writer: waclaw_koscielniak
    waclaw_koscielniak
  • Sep 12
  • 1 min read

nums = [1, 2, 3, 4]

ref = nums

copy = nums[:]

ref[0] = 99

copy[1] = 100

print(nums, copy)


[Running] python3 -u "/Users/name/test/test759.py"

[99, 2, 3, 4] [1, 100, 3, 4]

[Done] exited with code=0 in 0.059 seconds


ree












 
 
 

1 Comment


Guest
Sep 13

Try to verify it.

Like
bottom of page