Design an algorithm in Python to get the largest number in a list.
[2, 5, 3, 7]
def getMax(list):
    max = 0
    for num in list:
        if num > max:
            max = num
    return max

list = [2, 5, 3, 7]
print(getMax(list))