Satisfy Steve's need to return min(candidates[i]['ShortSpan'])

Replace
    shortspans = []
    for i in range(len(candidates)):
        shortspans.append(candidates[i]['ShortestSpan'])

with

    [c['ShortestSpan'] for c in candidates]

see http://docs.python.org/3/tutorial/datastructures.html#list-comprehensions