Answer:
def index_of (my_list, val):
for k in range(my_list.__len__):
if my_list.get_element_at(k) == val :
return k
Step-by-step explanation:
The python function "index_of" accepts two arguments, a list and the value to be searched for.
The for-loop iterates over the list using the "__len__" magic method to return the index of the searched term in the list if present.