Reimplementation of min() in Python
iterators

You can use an iterator

def my_min(num_list):
    # empty lists
    if not num_list:
        raise ValueError('Empty list')

    list_iter = iter(num_list)
    minimum = next(list_iter)
    for num in list_iter:
        if num &lt; minimum:
            minimum = num            
    return minimum


In response to Mathias' comment, here is a version that works with an iterable:

def my_min(seq):
    seq = iter(seq)

    try:
        minimum = next(seq)

        for num in seq:
            if num &lt; minimum:
                minimum = num            

        return minimum

    except StopIteration as e:
        pass

    raise ValueError('Empty list')


Improved based on @Wombatz comment:

def my_min(seq):
    seq = iter(seq)

    try:
        minimum = next(seq)

    except StopIteration as e:
        raise ValueError('Empty list') from None

    else:
        for num in seq:
            if num &lt; minimum:
                minimum = num            

        return minimum