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

import random

def _index_of(val, list):
    """
    Helper function for index of a number in a list.
    """
    for i in range(len(list)):
        if list[i] == val:
            return i
    return -1

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

# Enter the number
val = 5

# Calling the function
print((_index_of(val, list)))

#Remember to inspect code for bugs.