Can you implement a function in Python that takes a list of two numbers as input and returns the sum of the two numbers?
[5, 10]
def add(nums):
    return nums[0] + nums[1]

print(add([5, 10]))  #Prints 15