Question: PYTHON E1. Define a list variable called names and store the names of 5 fictional people in it. [] E2. Use [] notation to display

PYTHONPYTHON E1. Define a list variable called names and store the names

E1. Define a list variable called names and store the names of 5 fictional people in it. [] E2. Use [] notation to display the name at the rightmost index of the list. ] E3. Use slicing notation to display 3 middle elements of the list, i.e., at indices 1, 2 and 3. [] E4. Use slicing notation to replace the first three elements of the list with the names 'Moe', 'Larry' and 'Curly'. U Use the del operator to delete 'Curly' from the list U E5. Create a list containing 10 positive integers called ages. [] E6. Use the [] operator to access and display the value at index 5 of ages. U E7. Use the [] operator to change the value at index 3 of ages to 100 and then display the updated contents of ages. [] Use replace the elements at indices 3 through 5 of ages with the value 101, 102, and the new contents ages. U E9. Use the del operator to remove the elements of ages at indices i through 4. U

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!