Question: NO chatgpt, no AI please : Write a function named find _ indices which takes two parameters as follows: A list that may or may

NO chatgpt, no AI please : Write a function named find_indices which takes two parameters as follows:
A list that may or may not contain values (can be mixed data types), and
A target value (of any type)
The function should return the list of indices (locations) in the list, if any, where the
target is present. Make no assumptions about the data in the list, or the length of the
list. The function should work if the list is empty or not empty.
Example Executions
data =[]
print(find_indices(data,1)) # prints []
data =[1,3,5,1,3,5]
print(find_indices(data,3)) # prints [1,4]
data =[-4,65,23,12,-56, 'string', True, 4.56,23]
print(find_indices(data, True)) # prints [6]
data =[2,4,6,8,10,12]
print(find_indices(data,5)) # prints []

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!