Build a Python program to print the smallest number in a list.
[3, 5, 2, 8, 1]
def smallest_list(list_numbers):
    smallest = list_numbers[0]
    for i in list_numbers[1:]:
        if i < smallest:
            smallest = i
    return smallest