aList = ["Cat", "Apple", "Dog", "Lion", "Orange"]animals = []for i in range (len(aList)) :if aList[i] == "Cat" or aList[i] == "Lion":animals.append(aList[i])print(animals)Convert Python code...

aList = ["Cat", "Apple", "Dog", "Lion", "Orange"] animals = [] for i in range (len(aList)) : if aList[i] == "Cat" or aList[i] == "Lion": animals.append(aList[i]) print(animals) Convert Python code snippet into more pythonic code in handling aList in a loop and if-statement

Jun 08, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here