Create an algorithm in Python that takes a list and returns the sum of the list items.
[1, 2, 3]
def listSum(lst):
    s = 0
    for i in range (len(lst)):
        s += lst[i]
    return s

print (listSum([1,2,3])) # 6