human
Can you show me a Python code to return list get index with defaults.
assistant
Here is a Python code to return list get index with default index

import random

def get_index(list, value, default=-1):
    """
    Get index of value in list.
    """
    try:
        return list.index(value)
    except ValueError:
        return default

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

# Enter the value
value = 5

# Calling the function
print((get_index(list, value)))

#Remember to inspect code for bugs.