Human: Write me a Python function to return the index of a number in a list. Assistant: 
Here is a Python function to return the index of a number in a list

import random

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

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

# Calling the function
print((index(list, 3)))

#Example Output
# 2

#Remember to inspect code for bugs.