human
Write me a Python program to get the first and last index of an element in a list.
assistant
Here is a Python program to get the first and last index of an element in a list

import random

def get_first_last_index(list, element):
    """
    Returns the first and last index of element in list.
    """
    for i in range(len(list)):
        if list[i] == element:
            return i, i
    return -1, -1

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

# Enter the element
element = 3

# Calling the function
print((get_first_last_index(list, element)))

#Example Output
# (2, 2)

#Remember to inspect code for bugs.