How to Modify Lists Using Phyton
This instruction set is for beginners using Phyton. There are 5 basic modifications to a list using phyton, but this instruction set only includes how to make and name a list, add items, index, update and remove items in the list. To learn more about other modifications, look up more modifications to a list!
Supplies
Materials: Phyton IDLE application
Open Phyton IDLE Shell
Open the application
Name a List by Typing a Name for a Category of Your Own Choice
Note: In the example above, the chosen category is colors
Add an Equal Sign Next to It
Next to the Equal Sign, Add Items to a List by Typing ‘[‘ + the Items You Want in the List Divided by ‘,’ and Close It With ‘]’ , Hit Enter
Note: In the example above, the items in the list above are strings (words) which is why it needs a quotation mark but if it is numbers, it does not need any.
Test Run the Code Using Print + Parenthesis With the Name of Your List and Hit Enter. This Is to Make Sure Your List Works Before Moving Forward!
Access Values in the List by Typing Print + (name of List[number of Value You Want to Access])
Hit Enter
Type the Name of List+[number of Value You Want to Access] + Equal Sign
Type a Word You Want to Replace the Item You Indexed With in Quotation Marks to Update an Item
Hit Enter
Type Print+name of List to See the Updated List
Type Name of List + Period + Remove
Type the Word You Want to Remove That Is in the List in Quotation Marks Next to the Word Remove to Remove an Item
Hit Enter
Check Updated Modified List by Typing Print+name of List Inside a Parenthesis
Hit Enter