Question: PYTHON CODE 1. Extract the tuple cat and dog to the values personality, voice and food. Make a new list that contains the personality of

 PYTHON CODE 1. Extract the tuple cat and dog to the

PYTHON CODE 1. Extract the tuple cat and dog to the values personality, voice and food. Make a new list that contains the personality of both. You can use zip() and retrieve the first item. cat = ("aloof, meow, tuna") dog = ("friendly, woof, sausage) The output should be: ["aloof, friendly"] 2. Write a code where you change the dog's food from sausage to beef. Print out the new tuple. dog = (friendly, woof, beef)

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!