@@ -90,7 +90,7 @@ num.insert(10,8)
9090print (num)
9191# Result:[1,3,4,7,8]
9292```
93- - you can also use negative index for inserting element
93+ ** you can also use negative index for inserting element**
9494- similarly if you have give negative index which is not present in current list the item will added at 0th index
9595
9696Example:
@@ -103,7 +103,7 @@ print(num)
103103# Result:[8,1,3,4,7]
104104```
105105### 3.extend() :person_fencing :
106- - ** extend()** method add the number of list element to the end of the current list
106+ ** extend()** method add the number of list element to the end of the current list
107107
108108Syntax:
109109``` python
@@ -122,13 +122,13 @@ print(num1)
122122
123123## 2.Delete :red_circle :
124124
125- - There are different ways to delete element from the list.
125+ There are different ways to delete element from the list.
1261261 . del
1271272 . pop()
1281283 . remove()
129129
130130### 1.del :no_entry :
131- - if you removed item using del statement you cant use them for further process.
131+ if you removed item using del statement you cant use them for further process.
132132
133133Syntax:
134134``` python
@@ -156,6 +156,7 @@ del number
156156print (number)
157157
158158# Result:error because number list is deleted
159+ # ERROR:name 'number' is not defined
159160```
160161
161162### 2.pop() :no_entry_sign :
@@ -223,7 +224,7 @@ color.remove("black")
223224````
224225
225226# # 3.Update :drum:
226- - for updating the element value
227+ For updating the element value
227228
228229Syntax:
229230```python
@@ -232,10 +233,13 @@ list[index]="new value"
232233Example:
233234``` python
234235color= [" blue" ," green" ," red" ]
236+
235237# update blue with *black*
236238color[0 ]= " black"
239+
237240# print new updated list
238241print (color)
242+
239243# Result:["black","green","red"]
240244```
241245
0 commit comments