• find_last(my_list, x): Takes two inputs: the first being a list and the second being any type. Returns the index of the last element of the list which is equal to the second input; if it cannot be...


In python please


• find_last(my_list, x): Takes two inputs: the first being a list and the second being any type.<br>Returns the index of the last element of the list which is equal to the second input; if it cannot be<br>found, returns None instead.<br>>>> find_last(['a', 'b', 'b', 'a'], 'b')<br>>>> ind = find_last(['a', 'b', 'b', 'a'], 'c')<br>>> print(ind)<br>None<br>• find_first(my_list, x): Takes two inputs: the first being a list and the second being any type.<br>Returns the index of the first element of the list which is equal to the second input; if it cannot be<br>found, returns None instead.<br>>> find_first(['a', 'b', 'b', 'a'], 'b')<br>1<br>>>> ind = find_first(['a', 'b', 'b', 'a'], 'c')<br>>>> print(ind)<br>None<br>

Extracted text: • find_last(my_list, x): Takes two inputs: the first being a list and the second being any type. Returns the index of the last element of the list which is equal to the second input; if it cannot be found, returns None instead. >>> find_last(['a', 'b', 'b', 'a'], 'b') >>> ind = find_last(['a', 'b', 'b', 'a'], 'c') >> print(ind) None • find_first(my_list, x): Takes two inputs: the first being a list and the second being any type. Returns the index of the first element of the list which is equal to the second input; if it cannot be found, returns None instead. >> find_first(['a', 'b', 'b', 'a'], 'b') 1 >>> ind = find_first(['a', 'b', 'b', 'a'], 'c') >>> print(ind) None

Jun 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here