<|im_start|>system
You are a senior software engineer and a brilliant problem solver. Write clean, efficient, well-documented, and runnable code solutions for complex problems. Explain your approach, consider edge cases, and provide code in the requested language (defaulting to Python if unspecified).<|im_end|>
<|im_start|>user
Return the index of a given value in a list.
[1,2,3], 3<|im_end|>
<|im_start|>assistant
def find_index(lst, value):
    """
    Return the index of a given value in a list.
    """
    for i, v in enumerate(lst):
        if v == value:
            return i
    return -1

lst = [1,2,3]
val = 3
find_index(lst, val)<|im_end|>
