Updated python.md
Provided correct description for list elements replacement
This commit is contained in:
parent
090d42f103
commit
2175c6275c
|
@ -11,7 +11,7 @@ category: Python
|
||||||
list[:-1] # returns all but the last element
|
list[:-1] # returns all but the last element
|
||||||
|
|
||||||
list[i] = val
|
list[i] = val
|
||||||
list[i:j] = otherlist # replace ith to jth element with otherlist
|
list[i:j] = otherlist # replace ith to jth-1 elements with otherlist
|
||||||
del list[i:j]
|
del list[i:j]
|
||||||
|
|
||||||
list.append(item)
|
list.append(item)
|
||||||
|
|
Loading…
Reference in New Issue