Given a list of integers, write a Python program to find the list's maximum value.
[1, 8, 2, 4, 10]
def find_max(nums):
    max_value = nums[0] 
    for i in nums:
        if i > max_value:
            max_value = i
    return max_value

nums = [1, 8, 2, 4, 10]
print(find_max(nums))