Skip to content

Commit f9a0a64

Browse files
authored
Update List.py
documentation for better understanding.
1 parent a2fc6fe commit f9a0a64

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

List.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
List = []
22
# List is Muteable
33
# means value can be change
4-
List.insert(0, 5)
5-
List.insert(1, 10)
4+
List.insert(0, 5) #insertion takes place at mentioned index
5+
List.insert(1, 10)
66
List.insert(0, 6)
77
print(List)
8-
List.remove(6)
9-
List.append(9)
8+
List.remove(6)
9+
List.append(9) #insertion takes place at last
1010
List.append(1)
11-
List.sort()
11+
List.sort() #arranges element in ascending order
1212
print(List)
1313
List.pop()
1414
List.reverse()

0 commit comments

Comments
 (0)