Answered step by step
Verified Expert Solution
Question
1 Approved Answer
For the next few exercises we will be reviewing the use of pop(), append(), remove(), and indexing into lists. For this problem, consider the following
For the next few exercises we will be reviewing the use of pop(), append(), remove(), and indexing into lists. For this problem, consider the following list:
Lists can store ordered collections like playlists. In the following exercises you will be modifying a playlist by removing either specified songs or songs at specified positions. You will also be adding some of your own songs to the list and printing elements at specified indicies. Pop Practice: Remove the 3rd song from the list using pop, store it, and print the name of the song you removed. hint: 3rd element doesn't mean 3rd index. \# Your Solution Here Remove Practice: Use the remove function to remove the song "Wolves" from the playlist. Print the playlist after this song has been removed. \# Your Solution Here Append Practice: Append one or more songs to the playlist. Print the playlist after these operations have been completed. \# Your Solution Here Indexing Practice: Print the first and last elements of the playlist, each on seperate lines. Hint: Recall that you can use negative numbers to index starting from the end of the listStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started