Question: 3 . 2 0 LAB: List basics Instructor note: Reminders: to create a list: the _ list = ' [ one , two, three ]

3.20 LAB: List basics
Instructor note:
Reminders:
to create a list: the_list ='[one, two, three]
to combine (concatenate) lists: one_list + two_list
to add thing to a list: the_list.append (thing)
to find the position (index) of thing in a list: the_list.index (thing)
to assign something to an index of a sequence (string or list): the_list [index]= thing
to remove an element from a list: the_list.remove (thing)
to remove an element from a list and assign it to a variable: result = the_list.pop (index)
Given the user inputs, complete a program that does the following tasks:
Define a list, my_list, containing the user inputs: my_flower1, my_flower2, and my_flower 3 in the same order.
Define a list, your_list, containing the user inputs, your_flower1 and your_flower2, in the same order.
Define a list, our_list, by concatenating my_list and your_list.
Append the user input, their_flower, to the end of our_list.
Replace my_flower2 in our_list with their_flower.
Remove the first occurrence of their_flower from our_list without using index().
Remove the second element of our_list.
Observe the output of each print statement carefully to understand what was done by each task of the program.
Ex: If the input is:
rose
peony
lily
rose
 3.20 LAB: List basics Instructor note: Reminders: to create a list:

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!