Created
July 19, 2017 14:31
-
-
Save vihar/450348c724f4965e3ce4624799707e42 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stationery_list = ["Pen", "Pencil", "Notepad"] | |
stationery_list.append("Eraser") | |
# Adds new item at the end of the list | |
print(stationery_list) | |
stationery_list.insert(2, "Files") | |
""" | |
Insert method inserts a single element into a list.It takes two arguments one is | |
the numerical index at which the data is to be inserted and the other is value. | |
""" | |
print(stationery_list) | |
stationery_list.index("Pen") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment