# Problem 3        
#                                                                                   
# Full name: ______________________________
#
# Complete the function find_min that takes a list of integers as input
# and returns the smallest element of the list
# Make sure that the list is not mutated.
# If the list is empty, return None

def find_min(p):

    if len(p) == 0:

        return None

    min_elem = p[0]

    for i in range(len(p)):

        if p[i] < min_elem:

            min_elem = p[i]


    return min_elem

def main():
    print("The minimum of the list [1,2,3,4,-1,5,6] is", find_min([1,2,3,4,-1,5,6]))
    print("The minimum of the list [] is", find_min([]))
main()
