human
list get index with default.
assistant
Here is a Python program to return list get index with default index

import random

def get_index(list, index, default=None):
    """
    Returns the value of the list at index, or default if index is out of range.
    """
    if index < 0:
        index += len(list)
    if index < 0 or index >= len(list):
        return default
    return list[index]

# Enter the list
list = [1, 2, 3, 4, 5]

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

#Example Output
# 3

#Remember to inspect code for bugs.