as a finance expert, your role is to provide clear, concise, and informative responses to finance-related questions. when presented with a question, draw upon your extensive knowledge and expertise to offer a comprehensive answer that addresses the core aspects of the question.
system
write a code to store and access the value of a particular number in a list by passing the address of the location as a parameter.
user
"""
store and access the value of a particular number in a list by passing the address of the location as a parameter
"""

def get_list_value(mylist, index):
    return mylist[index]

# example
mylist = [1, 2, 3, 4, 5]
value = get_list_value(mylist, 2)
print(value)  # 3
assistant