Skip to content

Commit

Permalink
Update List.py
Browse files Browse the repository at this point in the history
documentation for better understanding.
  • Loading branch information
guptaarth87 authored Oct 1, 2022
1 parent a2fc6fe commit f9a0a64
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions List.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
List = []
# List is Muteable
# means value can be change
List.insert(0, 5)
List.insert(1, 10)
List.insert(0, 5) #insertion takes place at mentioned index
List.insert(1, 10)
List.insert(0, 6)
print(List)
List.remove(6)
List.append(9)
List.remove(6)
List.append(9) #insertion takes place at last
List.append(1)
List.sort()
List.sort() #arranges element in ascending order
print(List)
List.pop()
List.reverse()
Expand Down

0 comments on commit f9a0a64

Please sign in to comment.