The document provides instructions to perform operations on a list of names in Python. It tells the user to print specific indices from the list with formatting, slice a subset of elements, slice the last 4 elements, get the length of the list, change an element, copy an element, add a new element, and remove the first element before printing the final list.
Create a list with the following data.list1 = [William, Patrick.pdf
1. Create a list with the following data.
list1 = ['William', 'Patrick', 'Jon', 'Tom', 'Peter', 'Colin', 'Sylvester', 'Paul', 'Christopher', 'David',
'Matt', 'Peter', 'Jodie' ]
Print the items in the list at index 1, 5, and 11 in the same print statement. Format them so that
each takes up 10 spaces.
Print a list of elements with index positions 3-7 inclusive.
Print the last 4 names using the proper slicing techniques. Do not count the elements to
determine the last 4.
Print the number of elements in the list. Do not count the number manually. I may substitute a
different list when testing.
Change the third item in the list to Pertwee.
Copy the second item in the list to the 5th item.
Add Baker to the end of the list.
Delete the first item in the list.
Print the list.