human
index of an element in a list in.
assistant
Here is a Python function to index an element in a list

import random

def index_of_element(list, element):
    """Returns the index of the first occurrence of element in list."""
    for i, x in enumerate(list):
        if x == element:
            return i
    return -1

# Enter the list
list = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

# Enter the element
element = 5

# Calling the function
index = index_of_element(list, element)

# Printing the index
print(index)

#Remember to inspect code for bugs.