Write index_of_first_occurance(row, elem) that takes a list row and a value
elem, and returns the index of the first occurrence of elem in row. You
may assume elem is present.
Example
index_of_first_occurance([0, 0, 1, 1], 1) returns 2.
Implement this function:
def index_of_first_occurance(row: list, elem):
Write the function only — the arguments are read for you and the return value is printed automatically.
Arguments arrive as one Python literal per line, in this order: row, elem.
Input
[0, 0, 1, 1]
1
Output
2