Question: Create a list named animals that contains the elements: cat, dog, fish. Use the following python script: animals = [cat, dog, fish] The correct python
Create a list named "animals" that contains the elements: "cat", "dog", "fish". Use the following python script: animals = ["cat", "dog", "fish"] The correct python syntax to create a new list named "mammals" that contains the elements "cat" and "dog" is mammals = animals [1:3] mammals = animals [0:2] mammals = animals [1:2] mammals = animals [0:1]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
