Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit e05da9f

Browse files
committed
Update Notes.md
1 parent c3fabd6 commit e05da9f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

PythonDataStructsAndAlgo/Notes.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,10 @@
4646
> list, tuple and str classes have in common the support of indexing to access individual elements of a sequence, and each uses a low-level concept known as an array to represent that sequence.
4747
4848
> * *Shallow copy* - an array copy of another array that references the same elements as in the first list.
49-
> * With
49+
> * With Immutable elements, shallow copies are moot.
50+
51+
> * *deep copy* - a copy of the original list but all elements have a different reference.
52+
53+
> This can be done from the copy module using the deepcopy() function.
54+
55+
> To produce an array of 8 elements with a value 0 we can do: counters= [0] *8, meaning all the cells in the list reference to the same object "0"

0 commit comments

Comments
 (0)