Computer Science, asked by chillhousie140, 16 days ago

Write a program to read animal names from the user and store it in list and do the following operations

Remove 2nd animal name from the list
Find the total number of animals in a list.

Answers

Answered by samarthkrv
0

Answer:

animals = []

n = int(input("How many animals are there? \n"))

print("Enter all",n,"animal names-")

for i in range(n):

   x = input()

   animals.append(x)

print("Original list of animals:" , animals)

animals.pop(1)

print("After removing the second animal from the list:",animals)

print("The number of animals you entered:",len(animals))

Explanation:

Similar questions